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.2+447d1d590e6726b7881f750a0a0e42908f3e417e
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