Plugin Directory

Changeset 2778775


Ignore:
Timestamp:
09/01/2022 12:14:55 PM (4 years ago)
Author:
pgn4web
Message:

bug fix, coping with open texturize bug in wordpress/gutenberg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • embed-chessboard/trunk/embedchessboard.php

    r2439110 r2778775  
    88Author: Paolo Casaschi
    99Author URI: http://pgn4web.casaschi.net
    10 Copyright: copyright (C) 2009-2020 Paolo Casaschi
     10Copyright: copyright (C) 2009-2022 Paolo Casaschi
    1111
    1212ChangeLog:
     
    275275    else { $replacement  = "<div style='" . $containerStyle . "' class='chessboard-wrapper'>"; }
    276276
     277    // bugfix: adding an hidden PRE element outside the textarea in order to avoid the unwanted texturize of the shortcode due to the wordpress/gutenberg bug https://github.com/WordPress/gutenberg/issues/37754 see also https://core.trac.wordpress.org/ticket/54614 and https://wordpress.org/support/topic/bug-in-twenty-twenty-two-theme-shipping-with-wordpress-org-5-9/
     278    $replacement .= "<pre style='display:none;'>";
    277279    $replacement .= "<textarea id='" . $pgnId . "' style='display:none;' cols='40' rows='8'>";
    278280    $replacement .= $pgnText;
    279281    $replacement .= "</textarea>";
     282    // bugfix: closing the PRE element, see note few lines above
     283    $replacement .= "</pre>";
    280284    $replacement .= "<iframe src='" . plugins_url("pgn4web/board.html", __FILE__) . "?";
    281285    $replacement .= "am=" . rawurlencode($autoplayMode);
Note: See TracChangeset for help on using the changeset viewer.