{"id":3905707,"date":"2013-07-05T18:24:44","date_gmt":"2013-07-05T18:24:44","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/bug-in-generated-code\/"},"modified":"2016-08-21T02:39:58","modified_gmt":"2016-08-21T02:39:58","slug":"bug-in-generated-code","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/bug-in-generated-code\/","title":{"rendered":"Bug in generated code"},"content":{"rendered":"<p>In the &#8220;font-emoticons.php&#8221; all the smileys are applied on a span tag. The problem is that the author think the span tag can be self-closing. That is a flaw that seldom is noticed, since most browsers correct the mistake in certain occasions.<\/p>\n<p>But the problem becomes very much evident and troublesome once you try to style the smiley with css, let&#8217;s say make the size 80% of the surrounding text and in another color. Then, the styling get applied not only on the smiley, but on everything else after it.<\/p>\n<p>So to close the span properly, on line 36 change this:<br \/>\n<code>$code = &#039;\\\\1&lt;span class=&quot;icon-emo-&#039;.$this-&gt;name.&#039;&quot;\/&gt;\\\\2&#039;;<\/code><\/p>\n<p>to this:<\/p>\n<p><code>$code = &#039;\\\\1&lt;span class=&quot;icon-emo-&#039;.$this-&gt;name.&#039;&quot;&gt;&lt;\/span&gt;\\\\2&#039;;<\/code><\/p>\n<p>https:\/\/wordpress.org\/extend\/plugins\/font-emoticons\/<\/p>\n","protected":false},"template":"","class_list":["post-3905707","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3905707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3905707\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3905707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}