One solution is to hook into wp_insert_post_data
and do some regex magic to replace all instances of &
with &
:
// when saving posts, replace & with &
function cc_wpse_264548_unamp( $data ) {
$data['post_content'] = preg_replace(
"/&/", // find '&'
"&", // replace with '&'
$data['post_content'] // target the 'post_content'
);
return $data;
}
add_filter( 'wp_insert_post_data', 'cc_wpse_264548_unamp', 20 );
You will obviously only see changes when a post is saved/updated.
Related Posts:
- Is it possible to create nested lists in the WYSIWYG editor?
- TinyMCE Anchor Button not showing
- TinyMCE strips line breaks on mceAddControl
- Change Default Font Size and Remove Unwanted Font Sizes in TinyMCE
- Stop WordPress Visual Editor converting backticks into code blocks
- How to Add TinyMCE to widget
- Is it possible to disable the image alignment options in the post editor?
- How to dynamically generate wordpress editor on frontend?
- Change syntax styling of TinyMCE HTML Text Editor
- More than one TinyMCE (wp_editor) with different $settings[‘drag_drop_upload’] values breaks
- Load WordPress Editor .css on Front End
- “Formats” Select Menu in WP Editor doesn’t show up with correct colour
- Adding Custom Text Patterns in the WP 4.5 Visual Editor
- Remove HTML editor and visual/HTML tabs from TinyMCE
- Add popup window to TinyMCE buttons
- How to get the input of a TinyMCE editor when using on the front-end?
- TinyMCE 4.x : How to customize toolbar on wp_editor()
- wp_editor disable after reaching character count limit
- How to use the new Dashicons for custom TinyMCE buttons?
- Add unique class or ID information to tinyMCE
- How can I stop TinyMCE from converting my HTML entities to characters?
- How to keep non-breaking spaces in the visual editor?
- Is there a way to prevent the Editor from modifying my HTML
- Cite-Tag for blockquotes
- Secure Validation of wp_editor in Theme Options
- Snippet: Use classes instead of inline styles for text alignment
- Apply custom style to single word in WordPress
- How to disable TinyMCE 4 keyboard shortcuts
- How to customize the symbols that appear in the Visual Editor insert custom character
- Tiny MCE not adding p tag when saving theme option
- Add Shortcode inline inside Gutenberg block
- TinyMCE Editor Set Default Tab
- data-accordion removed in Visual Editor
- Registering custom TinyMCE buttons, for admin area, to work with custom instances of wp_editor
- Remove quicktag buttons but not Visual / Text editor and tabs
- How to make WordPress and TinyMCE accept tags wrapping block-level elements as allowed in HTML5?
- TinyMCE editor – new lines not rendered on front end
- How to get WP editors tinyMCE instances
- Visual Editor freezing on text highlight since 4.3
- tinyMCE duplicates previous block element when pressing return (visual editor)
- Count Words using tinymce in the front-end
- tinyMCE.activeEditor = null WP editor loaded in ‘Text’ mode?
- Add table controls with wp_editor minimal editor configuration (‘teeny’)
- Customising the WordPress TinyMce editor and it’s buttons
- Enable Visual Editor In Comments On CPT Edit Page
- Text cut off after the character 𪇆 in TinyMCE
- Adding image to visual editor popup for shortcode with wp.media and wp.mce: changing image duplicates shortcode
- Using main style.css with add_editor_style
- How can I control the HTML output of my post?
- TinyMCE Plugin Parameter
- TinyMce in WordPress – Getting the “fullscreen” button to stay on the right when customising button layout
- Added custom styles to Visual Editor. Classes are appended and not replaced as intended
- wpeditor issue – shows both mode and not able to focus/edit during visual mode
- wp_editor on input changes content
- Preserving tabs and line breaks in when switching from HTML to Visual Editor
- Convert this textarea to rich html format via wp_editor
- Add a select a class dropdown in tinymce
- Limit Block format tags in WordPress wp_editor
- How to disable formatting
- Add table button in editor without Plugin
- Custom settings page TinyMce: no formatting when echoing value of editor
- Make Textarea a TinyMCE (editor box)
- How to remove the statusbar from the default wordpress editor?
- How to get line breaks to translate to paragraphs?
- wp.editor.initialize does not show the same default toolbar
- WordPress Admin Not Loading All Core Scripts
- TinyMCE Editor change underline button behavior – u tag instead of span text-decoration underline
- Custom TinyMCE style formats disabled
- Adding TinyMCE buttons without removing plugin buttons?
- Visual editor not showing all table rows
- Adding custom styles to elements, without creating new elements
- Customer Support: TinyMCE stopped working (on some computers)
- customize tiny MCE blockqute
- allowing all HTML tags in tinymce editor
- Keyup events in tinymce editor not working
- Tiny MCE doesn’t look anything like my blog
- How to force insertion in editor
- How to apply a custom skin to WP_Editor / TinyMCE?
- TinyMCE not loading in IE8
- Visual Editor is blank – 404 for plugin js
- TinyMCE: Move buttons from 2nd row to top row
- Best Browser for Editing Posts
- How to apply padding to TinyMCE editor?
- TinyMCE strips off the href tag inside span, if i change from text to visual
- Loading a self-hosted custom @font-face into TinyMCE dropdowns (Classic Editor) via ‘tiny_mce_before_init’ filter
- clasic editor – article categories customization?
- WordPress Editor without buttons
- Visual editor popover or placeholder
- Adding microdata using Structured Data Markup Helper HTML
- How to modify VisualComposer’s TinyMCE editor only for a specific shortcode
- WordPress adding extra html coding to my data on saving
- wp_editor Too Tall when Content is Loaded
- Inline Editing with wp_editor and tinymce (problem with textarea)
- TinyMCE 4.0: specifying buttons to display [duplicate]
- Adding New Row of Custom TinyMCE
- WYSIWYG with HTML source?
- Preventing tinyMCE from auto formatting selected blocks of content
- Add custom classes to TinyMCE generated markup
- wp_insert_post() dont post content like i need it :(
- WordPress Started Executing Code Inside PRE Tags Even They Are Properly Escaped