Click or drag to resize

PageHelperSanitizePageContent Method

This is preliminary documentation and is subject to change.

Sanitizes the MediaWiki page content locally for SHA1 evaluation.

Namespace: WikiClientLibrary.Pages
Assembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.3+0a73c45f0c78941900e328c6c6b819597b665e00
Syntax
public static string SanitizePageContent(
	string content
)

Parameters

content  String
The content to be sanitized.

Return Value

String
Exceptions
ExceptionCondition
ArgumentNullExceptioncontent is null.
Remarks

This method normalizes line breaks into "\n", and trims the trailing white spaces. Leading white spaces are kept to align with the MediaWiki behavior.

Due to the limitation of offline page content normalization, this function will not expand and ~~~~ or {{subst:}} magic. This could still cause different content and thus SHA1 hash from the MediaWiki server being evaluated, possibly causing false-positive when checking whether the page content retrieved from MediaWiki server is the same as the local version.

See Also