Skip to content

Instantly share code, notes, and snippets.

@wertyoo
Last active July 15, 2019 21:01
Show Gist options
  • Save wertyoo/29b349beba9da7cc6d3f74b04f3d76f7 to your computer and use it in GitHub Desktop.
Save wertyoo/29b349beba9da7cc6d3f74b04f3d76f7 to your computer and use it in GitHub Desktop.

HTML Source (Original HTML):

<div class="ad_box"><img src="some_ad.png" /></div>

HTML Source sent via JSON (Escaped JSON):

{ "json_property": "<div class=\"ad_box\"><img src=\"some_ad.png\" \/><\/div>" }

HTML Source sent via XML (Using CDATA):

<xml_node><![CDATA[<div class="ad_box"><img src="some_ad.png" /></div>]]></xml_node>

HTML Source sent via XML (Escaped XML):

<xml_node>&lt;div class=&quot;ad_box&quot;&gt;&lt;img src=&quot;some_ad.png&quot; /&gt;&lt;/div&gt;</xml_node>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment