jblas at adobe.com
Wed Aug 13 13:57:33 PDT 2008
Yeah the transformations were exactly what I was thinking. Just curious,
why are we prefixing as opposed to postfixing the transformation names?
I guess to my eyes, it would be easier to read the template code/markup
and see what properties were actually being used if they came after the
--== Kin ==--
From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org] On
Behalf Of Jon Ferraiolo
Sent: Wednesday, August 13, 2008 11:09 AM
To: ide at openajax.org
Right now we have both property substitution using @@foo@@ syntax and
localization substitution using %%bar%%. Kin has asked if we can extend
the syntax to take into account the fact that a given substitution
string might appear within HTML content (which has its own syntax
I promised to send an email with a proposal.
Here is what I propose - add two optional parenthetical prefixes,
(htmlchars) and (jschars) to variable references, where:
(htmlchars) transforms the substitution string to the following
replacements (aligns with PHP's htmlspecialchars()):
& with &
< with <
> with >
" with "
' with '
(jschars) transforms the substitution string to the following
replacements (aligns with PHP's addslashes()):
\ with \\
' with \'
" with \"
To illustrate (htmlchars), suppose your have:
and the user entered the following for the remark property: << I'm in
then the resulting content would be: << I'm in love! >>
To illustrate (jschars), suppose you have:
document.getElementById('textfield').value='<< I\'m in love! >>';
I propose a variable reference can have either (htmlchars) or (jschars)
or neither, but not both.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IDE