Search

Is there any way to get special characters to show their character entity instead of actually outputting?

Example: When I add a non-breaking space in my titles with a &nbsp ; (no space before the ;) in the ?debug screen it literally shows a non-breaking space in the code instead of the entity. It does the same thing with UTF-8 entities. To see them, I have to view source in the browser.

This may just be a limitation of the ?debug screen because it's being rendered with a browser. Thought I'd ask anyway.

Can you submit this as a bug?

I was wondering if it was a bug or just a limitation of previewing in a browser. It does the same thing in version 1.7 so I'm not sure I'd call it a bug.

I could submit it as one, but it might be more of a feature request. Before I submit it as anything, I'll test the problem out more.

I'm assuming you mean in the "Result" tab only. I don't think this is a bug, but maybe something can be done to resolve it.

If your XML contains entities like £ the XSL transformation's result will contain the actual £ character, which means it will miss the str_replace("&", "&", $code) pass in the Result tab on the debug page.

The only solution would be to double-encode these in the XML (e.g. £) so maybe the text formatter is to blame? I'm not sure whether this would be an appropriate change to make.

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