<BR> stripping problem – Ultimate solving.
Hello all those with problems when <*br> (with no *) is stripped.
Here my solution:
You need to modify two files:
1. PHP(backend) file, which proceeds stripping on serverside.
So, lets go:
1. Find file /wordpress_root/wp-admin/js/editor.js.
This file is a compact version of human-readable file:
Find file /wordpress_root/wp-admin/js/editor.dev.js.
You do what:
- edit file /wordpress_root/wp-admin/js/editor.dev.js.
- Find line with code:
pee = pee.replace(/<br \/>\s*<br \/>/gi, '\n\n');
replace it with
//pee = pee.replace(/<br \/>\s*<br \/>/gi, '\n\n');
Btw, this file contains rules for <p> stripping and other. Play with it for your own.
- b. save it as /wordpress_root/wp-admin/js/editor.js and overwrite it.
Now move to backend file:
- a. find file /wordpress_root/wp-includes/formatting.php
- b. find line:
$text = str_replace('<br />', '', $text);
replace it with:
//$text = str_replace('<br />', '', $text);
- save it
Now you modified your backend and frontend.
Tested at 2.9.2 WordPress.
- The topic ‘<BR> stripping problem – Ultimate solving.’ is closed to new replies.