I have an issue with my WYSIWYG editor. If users copy in outside text, this is seen as something like the following:
" p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px 'Lucida Grande'; min-height: 13.0px} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px 'Lucida Grande'} Only the variables assigned in the last loop are accessible from outside the scope of a foreach loop."
This is obviously problematic.
On top of that, there also seems to be an issue with line breaks, i.e. <br />
tags. Sometimes they're picked up, sometimes not.
I've been running the content through strip_tags()
like so:
<?php
$body = strip_tags($body, '<a><br><b><i><img><ul><ol><li>');
Any thoughts on what's going on here?
If it helps, I'm using jWYSIWYG for the editor.