Search

I've got a field where I want to store URL:s. Entering something like www.site.com/polopoly.jsp?d=3116&a=863037 passes the build in URI verify test. But the XSLT processor chokes on the &. I've tried exchanging that for & in the URL, but upon save, Symphony replaces that entity with a & straight away.

What to do?

Can you enable the HTML Encode option in the data source?

That caused all html-tags in my body to be displayed, but made no change in the & case.

Ah good point, I wasn't aware of the other fields in the section. The problem is that a normal text field doesn't do anything to the input. To counter this problem you can use a Textarea with a text formatter (Markdown will do it). The output will be HTML encoded for you.

Rowan's Text Box extension will allow textarea fields to be given handles too, if that's a requirement.

Thanks, changing the field to a Textarea did the trick.

Nice workaround, but anyway this is a serious bug (because authors could make the website go down). Ampersands in text input fields should be encoded to &#x26, like this was the case in Symphony 1.7.

I will post this on the bug tracker.

EDIT: bug reported

bump.

but anyway this is a serious bug (because authors could make the website go down

As has happened on one of our sites many times. I'd say this is quite a critical bug for the future.

I've been using the text field when only one line of data is expected. Maybe I should go with a text area with the heigth of one row as my default choice.

I've had this problem too. Couldn't switch to the textarea/textbox because I needed to validate the URLs. What I did was HTML encode the DS output, and then on any fields that contained HTML tags, used disable-output-escaping="yes" in the XSL. Worked like a charm.

You could always use the HTTP Input field.

Thank you all for your suggestions. Don't get me wrong, but this bug should definitely be solved in the core instead of working around.

I am rather sure that Alistair will soon address this issue.

I will be fixing this today. Shall keep you posted.

Done. Please see http://bugs.symphony21.com/comments.php?DiscussionID=365 for details. We will be releasing a new stable version shortly to ensure everyone has access to the patch.

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