Hi!

I need to display a source code with < > " ' characters in my xml file.

But Drupal converts

  • < to &lt;
  • > to &gt;
  • " to &quot;
  • ' to &#039;

Is it possible to avoid the conversion of the code?

Comments

neclimdul’s picture

#494848: CDATA is pointless is where we converted from using CDATA to just escaping the output. We /have/ to escape & and <. > is probably over kill but it didn't seem a bad idea. Its possible this could be moved to the template or we could provide some sort of onmodified raw_themed_rows array that could be used at the theme layer if you know what you're doing. In the interest of not breaking current sites the later seems like the later is the best option.

As far as escaping ' and " I don't think that's views or views_bonus. My test site doesn't escape these.

nedjo’s picture

Category: feature » support

This escaping results when Views has passed data through check_plain() before rendering.

To avoid this, you can use a CCK text field and apply a filter format that allows the tags in question.

But your < and > tags will still be escaped as neclimdul explained.