[Plugin: Inline PHP] WP Strips Reg Exp backslash \ from post
In the darkest depths of WordPress there is a file called
formatting.phpit contains a function called wpautop(…) and the code within it is affecting the ability of the Inline PHP plugin to execute PHP regular expressions.
The advanced example quoted on the WordPress Inline PHP plugin page… doesn’t work.
On WP 3.2.1 used on my site all ‘\’ backslashes are stripped from each post wherever they occur!
In order to get just one backslash to appear and be saved to the database you have to type in 4 backslashes \\\\
On my site the following test turns out like:
To demonstrate the effect of backslash stripping I have noticed that after every fourth backslash one is ‘escaped’ and remains;
As a reference the first block comprises backslashes written into the posts using the \ HTML code, thats why they are not stripped out.
The second block was written using the backslash character itself and as you can see as the backslash count increases to 4 one backslash is written out and stored in the database. Note that if the post is subsequently saved for any reason ALL the backslashes will be stripped out of the version before it is saved to the database.
inline PHP works but only partially and not with backslashes which all get removed.
- The topic ‘[Plugin: Inline PHP] WP Strips Reg Exp backslash \ from post’ is closed to new replies.