beanymanuk Posted November 2, 2011 Share Posted November 2, 2011 I have a WYSIWYG on my site and somehow the users input it in the database with this at the end <p The p tag is left open and messing up the styling on the page How can I fix it so this tag is removed or closed? Is there a php function I can use? Link to comment https://forums.phpfreaks.com/topic/250300-wysiwyg-leaving/ Share on other sites More sharing options...
Adam Posted November 2, 2011 Share Posted November 2, 2011 Can you not just use a DBMS like PHPMyAdmin and change it manually? Link to comment https://forums.phpfreaks.com/topic/250300-wysiwyg-leaving/#findComment-1284299 Share on other sites More sharing options...
beanymanuk Posted November 3, 2011 Author Share Posted November 3, 2011 I don't want to have to change it manually want it to automatically to prevent page layout looking wrong Link to comment https://forums.phpfreaks.com/topic/250300-wysiwyg-leaving/#findComment-1284669 Share on other sites More sharing options...
Adam Posted November 4, 2011 Share Posted November 4, 2011 Check if your PHP installation has the Tidy extension installed; you could use the Tidy::cleanRepair() method to fix the broken mark-up. If not and you have root access to the web server, you can install it yourself. Otherwise you might need to use a scripted solution such as this - I can't vouch for it though. Link to comment https://forums.phpfreaks.com/topic/250300-wysiwyg-leaving/#findComment-1284931 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.