• Resolved brandon.w

    (@brandonw-1)


    I did a scheduled content update as a test and noticed that when the updated was published, much of my custom HTML was missing or otherwise “cleaned.” I expected that my pasted HTML would have been published verbatim. Is there anyway to schedule content updates so that the HTML does not get sanitized or otherwise changed from what I entered?

    Some examples:

    • semi-colons that end inline-styles are removed and spaces between inline style definitions are removed: style="margin-top: 10px;margin-bottom: 5px"
    • srcset attributes are removed: srcset="//www.domain.com/media/image.jpg 435w" sizes="435px"
    • some inline style tags (with the white-space attribute) are removed: style="white-space: nowrap;"
    • HTML comment tags re-render the less-than and greater-than signs into HTML-encoded character, which break the HTML comment: <!-- is converted to &lt ;!-- (added a space to prevent this post from converting it)
    • invalid HTML is removed (this is probably ok, but I’d rather know about it being invalid so it can be remedied, rather than just have it be removed): style="margin-botom: 10px;"

    I’m sure there are plenty of other examples of this happening, that did not occur in my test.

    • This topic was modified 5 years ago by brandon.w.
    • This topic was modified 5 years ago by brandon.w.
    • This topic was modified 5 years ago by brandon.w.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Kevin Behrens

    (@kevinb)

    @brandonw-1 can you let me know if adding the following line to your wp-config.php resolves this?

    define('REVISIONARY_NO_UNSLASH', true);
    

    This needs to go under other constant definitions, not at the very bottom of the file.

    Thread Starter brandon.w

    (@brandonw-1)

    No, this literally added a backslash before every quotation mark in the HTML content, rendering all of my code useless…lol.

    Plugin Author Kevin Behrens

    (@kevinb)

    Okay, thanks for checking. That was just a first pass; I’ll try to make time to dig into it further before the end of the week.

    Plugin Author Kevin Behrens

    (@kevinb)

    @brandonw-1 Are you running a page builder or front end editing plugin?

    Thread Starter brandon.w

    (@brandonw-1)

    Much appreciated!

    Thread Starter brandon.w

    (@brandonw-1)

    Probably the only one similar would be TinyMCE Advanced, with the “Replace the Block Editor with the Classic Editor” option enabled.

    I looked at my functions.php file (it’s been awhile, honestly) and about the only other thing that may play into this is the following (which is probably outdated and irrelevant by now):

    remove_filter( 'the_editor_content', 'wpautop' );
    remove_filter( 'the_editor_content', 'wptexturize');
    remove_filter( 'the_editor_content', 'convert_chars');
    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_content', 'wptexturize');
    remove_filter( 'the_content', 'convert_chars');
    remove_filter( 'the_excerpt', 'wpautop' );
    remove_filter( 'the_excerpt', 'wptexturize' );
    remove_filter( 'the_excerpt', 'convert_chars' );

    Nothing else looks like it would cause any conflicts… but I’m no developer…

    Thread Starter brandon.w

    (@brandonw-1)

    Hey @kevinb

    Just checking in to see if you’ve got this on the roadmap to look into further.

    Plugin Author Kevin Behrens

    (@kevinb)

    @brandonw-1 I have to admit, this one slipped off my radar. I’m working on some other Revisions development today and tomorrow; will swing back to this issue soon.

    Plugin Author Kevin Behrens

    (@kevinb)

    @brandonw-1 I haven’t been able to recreate these errors. I’ll need either more detail about your site configuration or login access to a site that exhibits it. If you would like to pursue the latter, send a request through publishpress.com/contact/

    Thread Starter brandon.w

    (@brandonw-1)

    HI @kevinb

    I sent a request through the publishpress site with login credentials for you. I wouldn’t know where to start with what detail to provide about the site configuration, so maybe you can have a look around for us?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Unexpected HTML Changes’ is closed to new replies.