• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
typography class & and &

[eluser]Flying Fish[/eluser]
I'm using codeigniter for an app that generates xml files which are then imported into Adobe inDesign.

Users input data into form inputs, the data is stored in a db, and an administrator can log into the back end and download xml files.

Trouble is, inDesign chokes on the '&' character when it sits in the text of the xml tags.

inDesign does however correctly handle the html &

I was wondering if I should write a function that does a string replace on '&' before each xml file is created, or if there was a more fancy codeigniter way of doing it with the typography class.

When you say the HTML &, do you mean & amp ;?
One of the text/typography helpers can probably do that, as I'm pretty sure one of them converts stuff like <, > etc to & lt ;, & gt ; etc

Edit: Added some spaces in the HTML chars

[eluser]Flying Fish[/eluser]
yes sorry, the html ampersand


had to wrap it in code tags

Hmm.. Can't find anything for & amp ; in the typography helper/class
This should be good enough

str_replace("&", "&amp;", $my_string_with_ampersands);

[eluser]Flying Fish[/eluser]
ya I didn't see anything in there either, but figured it was worth an ask, thanks for the reply

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.