URL Handling - Eonic/ProteanCMS GitHub Wiki
This section handles the sanitization of URLs by defining variables for illegal characters and their replacements. It ensures that any invalid or unsafe characters in URLs are replaced with a safe string to avoid errors or security issues.
Description: This variable defines a list of characters that are not allowed in URLs, such as spaces, punctuation, and special symbols. These characters need to be replaced to create valid, safe URLs.
<xsl:variable name="illegalURLString">
<xsl:text> /\.:!"'£$%^&*()|</xsl:text>
</xsl:variable>
Description: This variable defines the string that will replace any illegal characters found in URLs. In this case, it replaces them with four dashes (----
).
<xsl:variable name="illegalReplaceString" select="'----'" />