Discussion:
The problem with "esc"
Kenneth Yan
2012-07-31 01:49:59 UTC
Permalink
Dear all,

Please pay attention to the issue below.

(with-html-output-to-string (*standard-output* nil :prologue nil)
(:input :type "text" :name (escape-string "䜠奜") :readonly "readonly"
:value (esc "䜠奜")))

"<input type=\"text\" name=\"&#20320;&#22909;\"
readonly=\"readonly\"&#20320;&#22909; value=\"&#20320;&#22909;\">"


Best,
Kenneth
Stas Boukarev
2012-07-31 02:05:33 UTC
Permalink
Post by Kenneth Yan
Dear all,
Please pay attention to the issue below.
(with-html-output-to-string (*standard-output* nil :prologue nil)
(:input :type "text" :name (escape-string "你好") :readonly "readonly"
:value (esc "你好")))
"<input type=\"text\" name=\"&#20320;&#22909;\"
readonly=\"readonly\"&#20320;&#22909; value=\"&#20320;&#22909;\">"
Try escape-string instead.
--
With best regards, Stas.

_______________________________________________
cl-who-devel site list
cl-who-***@common-lisp.net
http:
Kenneth Yan
2012-08-01 00:56:40 UTC
Permalink
Of course, escape-string always works. But this is not my point. Since
"esc" is the shortcut of "escape-string", hope "esc" will be better.

Best,
Kenneth
Post by Stas Boukarev
Post by Kenneth Yan
Dear all,
Please pay attention to the issue below.
(with-html-output-to-string (*standard-output* nil :prologue nil)
(:input :type "text" :name (escape-string "䜠奜") :readonly "readonly"
:value (esc "䜠奜")))
"<input type=\"text\" name=\"&#20320;&#22909;\"
readonly=\"readonly\"&#20320;&#22909; value=\"&#20320;&#22909;\">"
Try escape-string instead.
--
With best regards, Stas.
_______________________________________________
cl-who-devel site list
http://common-lisp.net/mailman/listinfo/cl-who-devel
Stas Boukarev
2012-08-01 03:16:34 UTC
Permalink
Content preview: Kenneth Yan <***@gmail.com> writes: > Of course,
escape-string always works. But this is not my point. Since > "esc" is the
shortcut of "escape-string", hope "esc" will be better. esc is a shortcut
for (princ (escape-string ...)) [...]

Content analysis details: (-100.7 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low
trust
[209.85.215.51 listed in list.dnswl.org]
-100 USER_IN_WHITELIST From: address is in the user's white-list
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(stassats[at]gmail.com)
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
Archived-At: <http://permalink.gmane.org/gmane.lisp.who.general/310>
Post by Kenneth Yan
Of course, escape-string always works. But this is not my point. Since
"esc" is the shortcut of "escape-string", hope "esc" will be better.
esc is a shortcut for (princ (escape-string ...))
--
With best regards, Stas.
Loading...