kvnmck18 Posted March 13, 2009 Share Posted March 13, 2009 I am building some canonical elements in an XSLT page. <link rel="canonical" href="{$CanonicalURL}"/> But in the source code my "&" is always "&" -- which is usually a good case but not when using a canonical.I have this code in my XSLT: <xsl:text>http://www.kvnmck18.com/?id=</xsl:text> <xsl:value-of select="Page[@ID=$CononicalID]/@ID"/> <xsl:text disable-output-escaping="no"><![CDATA[&]]>title=</xsl:text> <xsl:value-of select="Page[@ID=$CononicalID]/title"/> This will display as: <link rel="canonical" href="http://www.kvnmck18.com/?id=1&title=Title" />but needs to be like:<link rel="canonical" href="http://www.kvnmck18.com/?id=1&title=Title" />How can I do this without throwing errors in the XSLT? Link to comment Share on other sites More sharing options...
boen_robot Posted March 14, 2009 Share Posted March 14, 2009 Why on earth would you want to disable this even for cannonical URLs? The browser (or search engine...) will automatically convert the & to & at parsing time. If you think that the URL your users/crawlers would reach is with "&" instead of "&", you're wrong. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.