URL Handling - Eonic/ProteanCMS GitHub Wiki

URL Handling

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.


illegalURLString

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> /\.:!"'£$%^&amp;*()|</xsl:text>
</xsl:variable>

illegalReplaceString

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="'----'" />

Back to Functions.xsl


⚠️ **GitHub.com Fallback** ⚠️