/ Published in: PHP
Useful for preparing content generated by CKEditor
Expand |
Embed | Plain Text
function paragraph_trim($content) { $result = preg_replace('!(^(\s*<p>(\s| )*</p>\s*)*|(\s*<p>(\s| )*</p>)*\s*\Z)!em', '', $content); return $result === NULL ? $content : $result; }
You need to login to post a comment.
