• Hi!

    I have a problem on my site; where in the Widgets section of the administration panel some of my Custom HTML blocks, after being saved and output correctly, become different when loading the blocks again in the Widgets page.

    Typically <p> elements are added, and other elements are changed. For example I have this Custom HTML, as I have saved it and as it is output to the HTML:

    <span id="js-fargval-toggle" class="js-val-toggle">
    		<div class="hamburger_icon_container">
    			<span class="valjutseenderubrik">V?lj webbplatsf?rger: </span>
    		</div>
    		<span class="fargval_alternativ fargval_cursor" id="js_fargval_ljust">Ljusa</span><span class="techsaker_span_selection_separator">|</span><span class="fargval_alternativ fargval_cursor" id="js_fargval_morkt">M?rka</span>
    </span>

    And when I open the widgets page, it shows the following:

    <p><span id="js-fargval-toggle" class="js-val-toggle"></span></p>
    <div class="hamburger_icon_container">
    			<span class="valjutseenderubrik">V?lj webbplatsf?rger: </span>
    		</div>
    <p>		<span class="fargval_alternativ fargval_cursor" id="js_fargval_ljust">Ljusa</span><span class="techsaker_span_selection_separator">|</span><span class="fargval_alternativ fargval_cursor" id="js_fargval_morkt">M?rka</span><br>
    </p>

    If I actually make an adjustment and save the widgets, it will save this new code. Does anyone know why this happens? It happens to many of my Custom HTML blocks, and it seems to be a bug. I’m using WordPress version 5.8.3 .

    Regards,
    Almir

    • This topic was modified 2 years, 9 months ago by almirdzankovic.
    • This topic was modified 2 years, 9 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thank you for your contribution and also the detailed description of your concern. Unfortunately, I was able to reproduce the problem in both WP 5.8.3 and WP 5.9.1. My search then led me to the Gutenberg repository where there has been an issue entry since August 2021. This has not yet been resolved, but is apparently being worked on.You can find it here: https://github.com/WordPress/gutenberg/issues/33832

    As long as this bug exists in Gutenberg, I unfortunately see no chance of entering code in the HTML block in widgets. Thanks for your support on this, I also learned something.

    • This reply was modified 2 years, 9 months ago by threadi.
    Thread Starter almirdzankovic

    (@almirdzankovic)

    Ok, then it might be fixed in the future.

    I have started to keep my HTML blocks content in a text file, so I can copy paste it. I don’t know of a better way to include them.

    Thanks for your reply.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom HTML Block Content Becoming Altered At Loading In Widgets Page’ is closed to new replies.