Make Snipplr WordPress plugin output valid XHTML


/ Published in: PHP
Save to your folder(s)

You should edit your WordPress plugin so that the $source variable at the end shows this value. Though it is a shame that code can't have an 'ol' as a childNode, and neither can the pre element. Couldn't find any way of making it all fit: http://learningforlife.fsu.edu/webmaster/references/xhtml/tags/text/pre.cfm


Copy this code and paste it in your HTML
  1. $source = "</p><p>{$title}{$author}{$comment}</p><div class='code' style='border: 1px dotted; overflow: auto; white-space:nowrap;'>$source</div><p>";
  2.  
  3. /* You should also set, in your WordPress Stylesheet, a 'code' class:
  4. .code {
  5. font: 1.1em 'Courier New', Courier, Fixed;
  6. text-align: left;
  7. }
  8. */

URL: http://rolandog.com/archives/2006/07/15/snipplr-wordpress-plugin/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.