-
MODX Staff
- 10,725 Posts
Different issues here:
1. using HTML entities in parameter strings is not supported -- the & character is used to delimit the snippet parameters themselves -- simplest solution, encode the & sign (as well as ? =`) using a character string you can translate back in your snippet.
2. certain TV types are applying htmlencoding automatically
3. rich-text editors are translating special characters to HTML entities in your content area’s -- though this is also complicated further by the TV types issue above...
I’m researching the best solution to all of these; in the meantime, if you have solutions or suggestions, feel free to contribute.
And than suddenly I understood what I am doing differently from you guys. Special characters give no problem, as long as you’re inserting them literally in the plain text editor. But unfortunately that doesn’t validate as correct XHTML. Only by using HTML entities can you be certain of special characters showing up the way they’re supposed to. Insert special characters literally, and people using a different default character coding table (because of a different OS, or different nationale) may see something else entirely. So throughout this thread, I’ve been trying to get MODx to accept HTML entities within the parameters.
So the problem is indeed as OpenGeek describes it. Personally I think it would help if you could escape the ampersand (like \—), but replacing the ampersand with another character would work fine as well (like %mdash;). I have no idea though, whether either approach would properly blend in with the rest of MODx.
A computer program is a utilitarian typographer's dream - a functioning machine composed completely of type. (John Maeda)
It will be possible to to escape the & in the next version of MODx. Example:
¶m=`\&anything`