Moodle 3.5+ text editor removes embeded code and html attributes

Moodle 3.5+ text editor removes embeded code and html attributes

by Suraj Kumar -
Number of replies: 0

I have not changed any default Moodle related settings regarding embed code, multimedia filter. Thus, the settings are default. 

What I see, Even if the description of course category in the database field is -

<---------content start---------/>

<h3 style="margin-top:0px;margin-bottom:15px;">Welcome</h3>

<iframe width="560" height="315" src="https://www.youtube.com/embed/wHw3ZLcnjuI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

<div  id="prg-mmmba-vTranscript" >

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean gravida, tortor in blandit imperdiet, erat libero aliquet ipsum, ut ultrices augue erat a nunc.</p>

</div>

<---------content end---------/>

But, when it is shown in editor on edit of category, iframe content & the id attribute of div tag is discarded in the editor and the description content is shown like this -

<---------content start---------/>

<h3 style="margin-top:0px;margin-bottom:15px;">Welcome</h3>

<div>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean gravida, tortor in blandit imperdiet, erat libero aliquet ipsum, ut ultrices augue erat a nunc.</p>

</div>

<---------content end---------/>

Has anyone faced this issue or any suggested solution?


Average of ratings: -