 | PageHelperSanitizePageContent Method |
This is preliminary documentation and is subject to change.
Sanitizes the MediaWiki page content locally for SHA1 evaluation.
Namespace: WikiClientLibrary.PagesAssembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.3+0a73c45f0c78941900e328c6c6b819597b665e00
Syntaxpublic static string SanitizePageContent(
string content
)
Public Shared Function SanitizePageContent (
content As String
) As String
Dim content As String
Dim returnValue As String
returnValue = PageHelper.SanitizePageContent(content)
public:
static String^ SanitizePageContent(
String^ content
)
static member SanitizePageContent :
content : string -> string
Parameters
- content String
- The content to be sanitized.
Return Value
String
Exceptions
RemarksThis 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