Kenneth Yan | 31 Jul 2012 03:49
Picon

The problem with "esc"

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

<div><p>Dear all,<br><br>Please pay attention to the issue below.<br><br>(with-html-output-to-string (*standard-output* nil :prologue nil)<br>&nbsp; (:input :type "text" :name (escape-string "&#20320;&#22909;") :readonly "readonly"<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; :value (esc "&#20320;&#22909;")))<br><br>"&lt;input type=\"text\" name=\"&amp;#20320;&amp;#22909;\" readonly=\"readonly\"&amp;#20320;&amp;#22909; value=\"&amp;#20320;&amp;#22909;\"&gt;"<br><br><br clear="all">Best,<br>Kenneth<br></p></div>
Stas Boukarev | 31 Jul 2012 04:05
Picon

Re: The problem with "esc"

Kenneth Yan <yanxiaoguang <at> gmail.com> writes:

> 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-devel <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-who-devel
Kenneth Yan | 1 Aug 2012 02:56
Picon

Re: The problem with "esc"

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


On Tue, Jul 31, 2012 at 10:05 AM, Stas Boukarev <stassats <at> gmail.com> wrote:
Kenneth Yan <yanxiaoguang <at> gmail.com> writes:

> 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-devel <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-who-devel

<div>
<p>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.<br><br clear="all">Best,<br>Kenneth<br><br><br></p>
<div class="gmail_quote">On Tue, Jul 31, 2012 at 10:05 AM, Stas Boukarev <span dir="ltr">&lt;<a href="mailto:stassats <at> gmail.com" target="_blank">stassats <at> gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
<div class="HOEnZb"><div class="h5">Kenneth Yan &lt;<a href="mailto:yanxiaoguang <at> gmail.com">yanxiaoguang <at> gmail.com</a>&gt; writes:<br><br>
&gt; Dear all,<br>
&gt;<br>
&gt; Please pay attention to the issue below.<br>
&gt;<br>
&gt; (with-html-output-to-string (*standard-output* nil :prologue nil)<br>
&gt; &nbsp; (:input :type "text" :name (escape-string "&#20320;&#22909;") :readonly "readonly"<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :value (esc "&#20320;&#22909;")))<br>
&gt;<br>
&gt; "&lt;input type=\"text\" name=\"&amp;#20320;&amp;#22909;\"<br>
&gt; readonly=\"readonly\"&amp;#20320;&amp;#22909; value=\"&amp;#20320;&amp;#22909;\"&gt;"<br>
</div></div>Try escape-string instead.<br><span class="HOEnZb"><br>
--<br>
With best regards, Stas.<br><br>
_______________________________________________<br>
cl-who-devel site list<br><a href="mailto:cl-who-devel <at> common-lisp.net">cl-who-devel <at> common-lisp.net</a><br><a href="http://common-lisp.net/mailman/listinfo/cl-who-devel" target="_blank">http://common-lisp.net/mailman/listinfo/cl-who-devel</a></span>
</blockquote>
</div>
<br>
</div>
Stas Boukarev | 1 Aug 2012 05:16
Picon

Re: The problem with "esc"

Kenneth Yan <yanxiaoguang <at> 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 ...))

--

-- 
With best regards, Stas.


Gmane