Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

TinyMCE stripping <script> and <iframe> tags in 5.2.4

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 05-14-2015, 10:36 AM
 
bob@n-flatables bob@n-flatables is offline
 

Member
  
Join Date: Nov 2012
Posts: 26
 

Default TinyMCE stripping <script> and <iframe> tags in 5.2.4

How can I fix this? Previously saved category descriptions (that were working fine) now break if I try to edit them. Upon inspection, all <iframe> and <script> tags are removed when I hit Save on the wysiwyg editor.
__________________
X-cart v 5.2
Reply With Quote
  #2  
Old 05-14-2015, 11:10 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: TinyMCE stripping <script> and <iframe> tags in 5.2.4

I don't think this is caused by tiny MCE, it is the htmlpurifier lib. I'm not sure if this is recommended but I changed this for a client by decorating the isParamTrusted() method of the View\RequestHandler\ARequestHandler class.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 05-14-2015, 11:14 AM
 
bob@n-flatables bob@n-flatables is offline
 

Member
  
Join Date: Nov 2012
Posts: 26
 

Default Re: TinyMCE stripping <script> and <iframe> tags in 5.2.4

Is this some new bug? It's so bad that I can't even embed a video using the video button on the wysiwyg editor and pasting in the embed code. It strips out the iframe every time.

It worked fine in 5.2.2.

EDIT: Is it perhaps this change?

2015-04-12 - [Bug] HTMLPurifier library is added to prevent potential dangerous content in input variables. #BUG-629 (Vladimir Semyonov)
__________________
X-cart v 5.2
Reply With Quote
  #4  
Old 05-21-2015, 06:16 AM
 
stvnjacobs stvnjacobs is offline
    
Join Date: Jan 2014
Posts: 2
 

Default Re: TinyMCE stripping <script> and <iframe> tags in 5.2.4

Has anyone resolved this? I came here looking for a way to remove this htmpurifier lib completely. It is destroying formatting of description fields that once worked perfectly fine, and preventing me from properly laying out my site. I was able to modify it to accept all <iframe> tags by flagging them as safe, but that was a less desirable workaround than adding the HTML5 video features that I was trying to implement. htmlpurifer is checking against HTML 4, from what I can tell. Even for things that should just work, it is getting in the way: removing id's, removing <div>'s, removing <spans>, and the list goes on. I just want it gone!
__________________
---
Reply With Quote
  #5  
Old 05-21-2015, 06:18 AM
 
stvnjacobs stvnjacobs is offline
    
Join Date: Jan 2014
Posts: 2
 

Default Re: TinyMCE stripping <script> and <iframe> tags in 5.2.4

I had filed a bug on the 12th, but not yet heard a response. It was confirmed, though.

https://bt.x-cart.com/view.php?id=44680
__________________
---
Reply With Quote
  #6  
Old 05-28-2015, 12:03 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: TinyMCE stripping <script> and <iframe> tags in 5.2.4

Quote:
Originally Posted by stvnjacobs
I had filed a bug on the 12th, but not yet heard a response. It was confirmed, though.

This is going to be fixed in the next 5.2.5 version.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #7  
Old 05-29-2015, 04:53 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: TinyMCE stripping <script> and <iframe> tags in 5.2.4

JFYI 5.2.5 is coming out next week.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #8  
Old 06-03-2015, 12:58 PM
 
bob@n-flatables bob@n-flatables is offline
 

Member
  
Join Date: Nov 2012
Posts: 26
 

Default Re: TinyMCE stripping <script> and <iframe> tags in 5.2.4

5.2.5 seems to have fixed everything, including the Multilevel Primary Menu module (which was completely nonfunctional in 5.2.4).

Testing on my site, divs (including IDs), scripts, and iframe tags are all working in Category Descriptions and Pages.
__________________
X-cart v 5.2
Reply With Quote

The following user thanks bob@n-flatables for this useful post:
qualiteam (06-04-2015)
  #9  
Old 09-16-2015, 05:08 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default Re: TinyMCE stripping <script> and <iframe> tags in 5.2.4

I have an issue this modules just appears with a blank space where the description should be, i have to disable it to see the text, it has been like that for me for several versions
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #10  
Old 09-16-2015, 09:24 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: TinyMCE stripping <script> and <iframe> tags in 5.2.4

Quote:
Originally Posted by RichieRich
I have an issue this modules just appears with a blank space where the description should be, i have to disable it to see the text, it has been like that for me for several versions
Hello Richard.
Are there any JavaScript errors in the browser console?

Anyway, this is kind of a rare issue, so I would advise to file support ticket to have our engineers investigate it right in your store. Also, please let me know the ID of the ticket so that I could speed it up.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:26 PM.

   

 
X-Cart forums © 2001-2020