[xslt] double-encoding XSL parameters in Python



Hello,

I've got an annoying problem using libxslt's Python bindings.

I'm passing in a global parameter (a string), which needs to be enclosed in quotes. I can't guarantee that the string won't contain more quotes, so to ensure that I don't terminate my quoted-string parameter I'm encoding any single quotes as ' before I pass in the string.

libxslt is encoding my already encoded string again, so 'hello here's a parameter' gets encoded to 'hello here's a parameter' by me, and then to 'hello here's a parameter' by libxslt.

Is there any way I can avoid this?

Thanks,

Matt

--
  Matt Patterson | Design & Code
  <matt emdash co uk> | http://www.emdash.co.uk/
  <matt reprocessed org> | http://www.reprocessed.org/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]