OpenMage / magento-lts

Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.
https://www.openmage.org
Open Software License 3.0
870 stars 436 forks source link

New TinyMCE 6 removes script and style tags #3651

Closed empiricompany closed 11 months ago

empiricompany commented 1 year ago

Preconditions (*)

  1. OpenMage 20.2.0
  2. php 7.4

Steps to reproduce (*)

  1. open some content that contains <script> or <style> tag with wysywyg editor (example content below)
  2. hide editor and return to html

Expected result (*)

  1. <script> / <style> tag not removed

Actual result (*)

  1. <script> / <style> tags removed from html

Example Content to Test out

<script>
console.log("This message should not appear when tinyMCE is active, as it means that it is executing JavaScript, exposing security issues");
</script> 
<script type="text/javascript>
console.log("This message should not appear when tinyMCE is active, as it means that it is executing JavaScript, exposing security issues");
</script> 
<script type="text/javascript>// <![CDATA[ 
console.log("This message should not appear when tinyMCE is active, as it means that it is executing JavaScript, exposing security issues");
// ]]></script> 
<script type="text/javascript">// <![CDATA[ 
console.log("This message should not appear when tinyMCE is active, as it means that it is executing JavaScript, exposing security issues");
    jQuery(function($){ 
        $("#carousel").owlCarousel({autoPlay:3500,lazyLoad:true,stopOnHover: true,pagination: false, autoPlay: true,navigation: true,navigationText:["<i class='icon-left-open-big'></i>","<i class='icon-right-open-big'></i>"],slideSpeed : 1900,paginationSpeed : 900,singleItem:true,transitionStyle:"fade"}); 
  }); 
// ]]></script> 
<style><!-- 
.owl-bottom-narrow .owl-controls{width:95%;} 
  .owl-bottom-narrow .owl-controls .owl-buttons .owl-prev{color:#fff; float:left;} 
  .owl-bottom-narrow .owl-controls .owl-buttons .owl-next{color:#fff; float:right;} 
    .hidden-xs{display:block;} 
    .visible-xs{display:none;} 
    @media(max-width:540px){ 
        .hidden-xs{display:none;} 
      .visible-xs{display:block;} 
      .owl-carousel.owl-theme .owl-controls.clickable .owl-buttons div i{visibility:visible; vertical-align:middle;} 
      .owl-banner-carousel.owl-middle-narrow .owl-controls .owl-buttons div.owl-prev, .owl-banner-carousel.owl-middle-narrow .owl-controls .owl-buttons div.owl-next{visibility:visible;opacity:1; width: 50px; 
        height: 50px; padding:10px 10px; border-radius:50px; line-height:20px; background: rgba(0,0,0,0.3); color:#fff;} 
      .owl-middle-narrow .owl-controls{display:block!important;} 
  } 
  --></style> 

<div class="hide-mob hidden-xs">
    <div class="owl-carousel owl-theme owl-bottom-narrow owl-banner-carousel" id="carousel" style="border-bottom: solid 5px #0c06f7;">

        <div class="item">
            <a href="{{store direct_url='link'}}"><img alt="altImg" src="{{media url="wysiwyg/banner/test.jpg"}}" style="width: 100%;" /></a>
        </div>
        <div class="item">
            <a href="{{store direct_url='link'}}"><img alt="altImg" src="{{media url="wysiwyg/banner/test.jpg"}}" style="width: 100%;" /></a>
        </div>
        <div class="item">
            <a href="{{store direct_url='link'}}"><img alt="altImg" src="{{media url="wysiwyg/banner/test.jpg"}}" style="width: 100%;" /></a>
        </div>
        <div class="item">
            <a href="{{store direct_url='link'}}"><img alt="altImg" src="{{media url="wysiwyg/banner/test.jpg"}}" style="width: 100%;" /></a>
        </div>
        <div class="item">
            <a href="{{store direct_url='link'}}"><img alt="altImg" src="{{media url="wysiwyg/banner/test.jpg"}}" style="width: 100%;" /></a>
        </div>
        <div class="item">
            <a href="{{store direct_url='link'}}"><img alt="altImg" src="{{media url="wysiwyg/banner/test.jpg"}}" style="width: 100%;" /></a>
        </div>
        <div class="item">
            <a href="{{store direct_url='link'}}"><img alt="altImg" src="{{media url="wysiwyg/banner/test.jpg"}}" style="width: 100%;" /></a>
        </div>
        <div class="item">
            <a href="{{store direct_url='link'}}"><img alt="altImg" src="{{media url="wysiwyg/banner/test.jpg"}}" style="width: 100%;" /></a>
        </div>

    </div>
</div>

Themes like Porto include Githubissues.

  • Githubissues is a development platform for aggregating issues.