encode escape the forward slash ( / )?
Possible Duplicate:
JSON: why are forward slashes escaped?
The function argument below is a string run through json_encode()
. I see that the forward slash in http://
is escaped to http://
. Obviously it is a special character when used like this <some_tag></some_tag>
but only when used in that structure.
There is no immediate problem..but I need to understand escapes to make some code updates.
<script type='text/javascript'>Arc.ViewHBookmark('[{"id":"1","0":"1","title":"cybercoders","1":"cybercoders","url":"http://cybercoders.com","2":"http:
php.net - json_encode
Related
JSON: why are forward slashes escaped?
It is just as a safety net for the </endtag>
structure for JSON embedded in <script>
elements in HTML documents.
It has no other significance.
链接地址: http://www.djcxy.com/p/47916.html上一篇: 斜杠在PHP变量不正确解析在JavaScript中
下一篇: 编码转义正斜杠(/)?