Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for javascript problem - including php

Current License: CC BY-SA 2.5

7 events
when toggle format what by license comment
Jan 28, 2009 at 13:44 vote accept Community Bot
Dec 16, 2008 at 17:11 comment added Jason S json_encode doesn't encode HTML entities. The only chars escaped in JSON, besides whitespace/nonprintable/unicode are " / \. (see www.json.org) If the strings in question have HTML tags like <b>, they will not be escaped using JSON. The reason to use htmlspecialchars is to show something verbatim.
Dec 16, 2008 at 15:45 comment added Jay Jason, he was calling html entities AFTER json encoding it... please read the code! This would result in html entities that have already been encoded in json encode, to then become html entities. Sure it may NOT be an issue with json encoding, but in general practice it is bad to do this!
Dec 16, 2008 at 14:20 comment added Jason S "any time you encode anything to a particular notation, you should convert the 'special characters'" ???? JSON handles everything correctly. He's just trying to show the JSON notation verbatim.
Dec 16, 2008 at 14:11 comment added user1253538 still having. I found an earlier version, where the php in the javascript is getting passed perfectly. It is something I have changed that has broken it, and I do not know what it is
Dec 16, 2008 at 13:36 comment added user1253538 article_desc contains the code for a webpage, so it is all html
Dec 16, 2008 at 13:22 history answered Jay CC BY-SA 2.5

AltStyle によって変換されたページ (->オリジナル) /