Skip to content
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

Update sanitization reporting #951

Merged
merged 5 commits into from
Feb 15, 2018
Merged

Commits on Feb 10, 2018

  1. Configuration menu
    Copy the full SHA
    c54a02d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fd56169 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2018

  1. Issue #843: Move Sanitization reporting to 'edit_form_top.'

    Before, this was on the 'save_post' action.
    But as Weston mentioned,
    this could be in one place,
    and this removes the need for a nonce.
    Also, remove the function is_authorized().
    This checked for a nonce.
    Replace this with the existing has_cap().
    Ryan Kienstra committed Feb 13, 2018
    Configuration menu
    Copy the full SHA
    2305fcb View commit details
    Browse the repository at this point in the history
  2. Issue #843: Prevent displayling extra errors for <p>.

    Because 'wpautop' runs on 'the_content',
    process_markup() showed errors from removing <p> tags.
    For example, it created this markup:
    <p><script async src=https://example.com/script></script></p>
    It seemed to have removed the <p> tag,
    As it contained a disallowed element.
    But it's not needed to report that the <p> is removed.
    So remove 'wpautop' as a callback for 'the_content.'
    Gutenberg also does this, unless the post has no block.
    @see gutenberg_wpautop().
    Ryan Kienstra committed Feb 13, 2018
    Configuration menu
    Copy the full SHA
    e7f896d View commit details
    Browse the repository at this point in the history
  3. Issue #843: Exit early if ! has_cap().

    Instead of wrapping the 'invalid_callback' in this,
    simply exist process_markup().
    If that callback isn't added,
    there's no need for the rest of the function.
    Ryan Kienstra committed Feb 13, 2018
    Configuration menu
    Copy the full SHA
    18a877e View commit details
    Browse the repository at this point in the history