Feature Proposal: New ENTITY Variable
Motivation
There is already a
%ENCODE{ "..." type="entity" }% variable to entity-encode variables, which is used for example to properly escape content intended for html input fields. There is a possibility that the encoding fails in case the to-be-encoded text happens to have a sequence like
"something" type="url" some more". E.g. the text could have a sequence that terminates the text early with a quote, followed by some text that confuses the ENCODE (or higher level content).
Description and Documentation
Add a new
%ENTITY{...}% variable that does the same as
%ENCODE{ "..." type="entity" }%. This avoids the potential issue of early termination of text if it contains a double quote.
Examples
Equivalents:
-
%ENCODE{ "%title{ default="" }%" type="entity" }%
-
%ENTITY{%title{ default="" }%}%
Impact
Implementation
--
Contributors: PeterThoeny - 2012-10-23
Discussion
Accepted by
JerusalemReleaseMeeting2012x10x26
--
PeterThoeny - 2012-10-26
This is now implemented and documented in
SVN trunk.
--
PeterThoeny - 2012-10-26