<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>gHacks technology news &#187; markup code</title> <atom:link href="http://www.ghacks.net/tag/markup-code/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Wed, 17 Mar 2010 18:27:35 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>How To Display Valid Markup Code In Websites</title><link>http://www.ghacks.net/2009/05/07/how-to-display-valid-markup-code-in-websites/</link> <comments>http://www.ghacks.net/2009/05/07/how-to-display-valid-markup-code-in-websites/#comments</comments> <pubDate>Thu, 07 May 2009 13:19:48 +0000</pubDate> <dc:creator>Martin</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[code]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html entities]]></category> <category><![CDATA[html entities converter]]></category> <category><![CDATA[markup code]]></category> <category><![CDATA[php]]></category> <category><![CDATA[valid code]]></category> <category><![CDATA[w3c]]></category><guid isPermaLink="false">http://www.ghacks.net/?p=12644</guid> <description><![CDATA[There are two difficulties or problems that Internet users encounter when they want to paste code into forms to display these on the Internet. The first problem that can be encountered is that the website will interpret part or all of the code instead of displaying it. A basic example would be to display the [...]]]></description> <content:encoded><![CDATA[<p><img src="http://www.ghacks.net/wp-content/uploads/2009/05/w3c.jpg" alt="w3c" title="w3c" width="100" height="86" class="alignleft size-full wp-image-12647" />There are two difficulties or problems that Internet users encounter when they want to paste code into forms to display these on the Internet. The first problem that can be encountered is that the website will interpret part or all of the code instead of displaying it. A basic example would be to display the html code needed to make text linkable on a website. These codes are interpreted by most forms automatically if the user just pastes the code into the form. The second problem that can arise is that the website will not validate because of the way it has been pasted into the form. Displaying the &amp; char will for example return an error when validating the code. This can lead to all kinds of troubles including broken RSS feeds (read: <a href="http://www.ghacks.net/2009/04/14/internet-explorer-8-and-feeds-the-xml-page-cannot-be-displayed/">The XML Feed Cannot Be Displayed</a>).</p><p><span id="more-12644"></span>Displaying valid markup code in websites, forums, blogs and any other page is not difficulty. The only thing that needs to be done to achieve this is to convert all entities before pasting the code. This can be done manually or by using a script like that offered at <a href="http://www.spacefem.com/tutorials/makecode.php">Spacefem</a>.</p><p>All that needs to be done is to paste the code into the form and click on the Make Code button at the bottom. To display the following code on a website</p><p><code>&lt;a href=&quot;http://www.ghacks.net/&quot;&gt;Ghacks&lt;/a&gt;</code></p><p>one would have to paste the following code into the form on the website where the code should be displayed</p><p><code>&amp;lt;a href=&amp;quot;http://www.ghacks.net/&amp;quot;&amp;gt;Ghacks&amp;lt;/a&amp;gt;</code></p><p><img src="http://www.ghacks.net/wp-content/uploads/2009/05/html_entities_converter-500x273.jpg" alt="html entities converter" title="html entities converter" width="500" height="273" class="alignnone size-medium wp-image-12646" /></p><p>This is actually the easiest way to ensure that the website will not interpret the code and that the code will be valid markup code.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/05/07/how-to-display-valid-markup-code-in-websites/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 6/13 queries in 0.004 seconds using disk

Served from: www.ghacks.net @ 2010-03-18 05:16:55 -->