Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi!
I need to display a source code with < > " ' characters in my xml file.
But Drupal converts
- < to <
- > to >
- " to "
- ' to '
Is it possible to avoid the conversion of the code?
Comments
Comment #1
neclimdul#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.
Comment #2
nedjoThis 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.