-
Notifications
You must be signed in to change notification settings - Fork 142
Run content through _wp_Nop #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I think we need to always run, or not run. Decisions not options ;)
I'm not convinced. Seems like we'd make the code more brittle by being dependent on
Yep |
After doing some further testing - I think its fine to just always run this. Agreed that we don't want to depend on switchEditors, _wp_Nop is a pretty hacky ~100 lines of regex that I don't really want to duplicate - and I guess that we would be able to support fewer edge cases. I've written some simpler regex to do this - should be sufficient. I'll look into doing some tests for this before we merge though. |
Can we make it fail gracefully then if the variable isn't there? |
Sure. I think if we go down the route of supporting the WP editor inside shortcake ui, and also nested shortcodes, we want this to be pretty robust and I'd rather lean on the built-in WP Core functionality where possible |
# Conflicts: # js/shortcode-ui.js
Fixes failing test as unautop trim
I've synced this up with master and added some of the things we discussed. However this is no longer working with WP trunk. The problem is that MCE views no longer work at all if the shortcode content has HTML. I think this broke here: WordPress/WordPress@b799bd8 I'll look into how feasable this is to support. |
Support for HTML and line breaks just got fixed in core. See https://core.trac.wordpress.org/changeset/32678 A somewhat simpler solution to #322 - although it only works for the inner content, and not data stored in attributes. I think this should go in regardless of #322, and we can review whether we need to extend support for HTML to all attributes. |
Run content through _wp_Nop
See #171
A few concerns here