Search

When saving something in a static XML datasource, Symphony is a little over-zealous with adding backslashes. When I save this:

<menu-title>This isn't fair</menu-title>

I get this:

<menu-title>This isn\'t fair</menu-title>

Fair enough, but when I click save again I get this:

<menu-title>This isn\\'t fair</menu-title>

and then:

<menu-title>This isn\\\'t fair</menu-title>

and so on. Can someone confirm this is a bug? I ended up getting around it by using the &apos; HTML entity, but it would be nice for that to handled in a friendlier way…

Confirmed.

Would you please post this issue on the bug tracker?

Sure, posted as Bug #393. Cheers.

Thanks for the report, we’ll look at putting in a fix for 2.2.

Hi,

I have just created a static xml datasource with this xml:

<link-desc>
  <page id="2">test description</page>
  <page id="3">description</page>
  <page id="10">description</page>
  <page id="11">description</page>
  <page id="5">description</page>
  <page id="4">description</page>
  <page id="8">description</page>
  <page id="12">description</page>
  <page id="13">description</page>
  <page id="6">description</page>
  <page id="7">description</page>
</link-desc>

The xml is added at the very top of the <data> element looking like this with a strange indentation:

    <link-desc>
  <page id=\"2\">test description</page>
  <page id=\"3\">description</page>
  <page id=\"10\">description</page>
  <page id=\"11\">description</page>
  <page id=\"5\">description</page>
  <page id=\"4\">description</page>
  <page id=\"8\">description</page>
  <page id=\"12\">description</page>
  <page id=\"13\">description</page>
  <page id=\"6\">description</page>
  <page id=\"7\">description</page>
</link-desc>

And on the front end I get a loadXML() error. Is this just me?

EDIT: You can't see it but there is backslashes before the id double quotes

can you edit your post and escape any backslashes you have in the code block, then they will show up.

Pull from integration, I've added some fixes in 2.2.1 for Static DS's

designermonkey: done!

brendo: Thanks, I ended up formating my xml differently, just wanted to point this out

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