WP_Editor messing up link in content
-
I am using a form (plugin) I am developing to create and edit posts from the front end. I can use wp_editor to create the post but on the form to edit the created post is where I am having the issue. I can get the post content and echo it out correctly and see it works fine as a debug check but when I pass the content into wp_editor it messes up the image tag in the content string.
What was < img src=”example300x300.jpg” width=”300″ / > becomes <img class="”example300×300.jpg”” aux=”””” width=””300”” />
Note the added smart quotes and the different x in the URL.I tried removing all double quotes before passing the content to wp_editor which fixed the quotes around the URL but not the ‘x’ and it changed aux=”width=300″.
I tried turning off all plugins except the ones critical to the page functionality with no effect.
I tried to turn off wptexturize with no effect.
The only thing I can find to fix the issue was to comment out line 284 in wp-includes/class-wp-editor.php
//$content = apply_filters( ‘the_editor_content’, $content, $default_editor );
But this will only work until the next upgrade because it is in the CORE!How do I fix this the right way???
- This topic was modified 2 years, 6 months ago by . Reason: Had to escape the example img tag
- This topic was modified 2 years, 6 months ago by . Reason: Had to escape the example img tag. 2nd try
The page I need help with: [log in to see the link]
- The topic ‘WP_Editor messing up link in content’ is closed to new replies.