Search

Hello there!

I’ve got a big problem. How do i escape the & char? I use a URI field to output a link, but when there’s a & char, symphony converts it to & Thanks a lot!

If you’re outputting your field like this:

<xsl:value-of select="uri-field"/>

Try:

<xsl:value-of select="uri-field" disable-output-escaping="yes"/>

More info

i am outputting the field like this:

<a href="{uri-field}">Link</a>

how to apply disable output escaping in this case?

<a>
    <xsl:attribute name="href">
        <xsl:value-of select="uri-field" disable-output-escaping="yes"/>
    </xsl:attribute>
    <xsl:text>Link</xsl:text>
</a>

this syntax works fine but not solves the problem :( debugging the page there’s a &amp; in the output too. why it’s marked green?

What version of Symphony are you using? What type of field is it?

i am using symphony 2.1.1 and the fields type is text input.

Can you attach a screenshot of your data source configuration?

here’s the screenshot, is there something wrong?

Attachments:
Bildschirmfoto 2011-01-07 um 17.43.22.png

and the xsl:

XSL

Hm. You said it’s already escaped in the XML, right?

in the XML it looks like this:

Attachments:
Bildschirmfoto 2011-01-10 um 04.42.48.png

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details