SnippetMaster Support Forums
Return to main website
 
February 17, 2010, 12:10:27 AM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
February 17, 2010, 12:10:27 AM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: it modifies some code - why? « previous next »
Pages: [1] Print
Author Topic: it modifies some code - why?  (Read 271 times)
nineusa

Posts: 1


[-] it modifies some code - why?
« on: October 11, 2009, 01:04:08 PM »

Hello'
I have this code in a webpage which is part of an external "widget" that is loaded dynamically:

<noscript id="OTNoScript">
                      <div id='NSWidgetLogo'> <img
src="http://www.opentable.com/dcwidget/DCWidgetBadge_2009.gif">
                      </div>
                      </noscript>

after I open the page in html view I can see the code being rewritten like this:


<noscript id="OTNoScript">
                  &amp;lt;div id=&amp;#39;NSWidgetLogo&amp;#39;&amp;gt; &amp;lt;img  src=&amp;quot;http://www.opentable.com/dcwidget/DCWidgetBadge_2009.gif&amp;quot; mce_src=&amp;quot;http://www.opentable.com/dcwidget/DCWidgetBadge_2009.gif&amp;quot;&amp;gt;&amp;lt;br /&amp;gt;
                  &amp;lt;/div&amp;gt;
                  </noscript>

Why it is and how to prevent it

Thanks for helping.
Report to moderator   Logged
foscolo

Posts: 2


[-] Re: it modifies some code - why?
« Reply #1 on: October 15, 2009, 02:33:51 AM »

I'm a bit of a W3C validadation obsessive. A valid page, once edited through Snippetmaster, may no longer be valid. Here's an example from valdiation report of a page edited in Snippetmaster which was previously valid:

Line 4, Column 66: Attribute "MCE_HREF" is not a valid attribute

…lesheet" type="text/css" href="nice.css" mce_href="nice.css">


Where did "MCE_HREF" come from?  I didn't include it in the original version. Then....

Line 117, Column 401: NET-enabling start-tag requires SHORTTAG YES

…le, four chairs, TV, DVD player.<br />


The <br /> has appeared - it's not necessary, as the text is already inside <p> ... </p>. More to the point, it's the XHTML <br /> in an HTML 4 document (so it should be <br>), and that's why it doesn't validate. (I think, anyway - I'm not a total expert on this). There are nearly 40 more examples of this in the same report.

HOWEVER... the Snippetmaster-edited page displays absolutely fine in all browsers I've tested, so this is really only about being able to tick the "valid code" box.

Anyway, is there a way around this, or is just an avoidable fact of life if you want to do clever stuff like this with php?


Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: it modifies some code - why? « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!