cqpbert Posted July 7 Share Posted July 7 I am confused how to edit my source code in a description when I have JS in it. It seems to turn all the script into something that makes no sense to me. So how do I edit the JS after the description is saved? </tr> </tbody> </table> <!--{cke_temp_711485536} <p>0--></p> above is an example. that was script before I saved it. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted July 8 Share Posted July 8 This is a known bug which is very complex as it's with 3rd party code. https://github.com/cubecart/v6/issues/3573 For now please delete them replace the includes/ckeditor folder from an older version. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 8 Share Posted July 8 Please examine the file /includes/ckeditor/config.js, and determine if this line appears exactly as follows: config.protectedSource = [/{\S*?.*?\S}/g]; If so, then this could be related to #3573, where a meta tag (well, possibly others) has been determined to be illegal. But I do think script tags are legal. If not, then review the Github issue #3427. 1 Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted July 8 Share Posted July 8 I saw another merchants with scrip tag problems since the latest update. He has a simple bit of JS like which failed. I think we're going to have to roll back to an older version of CKEditor. This had open and close script tags with a variable declared for the page layout which was then picked up elsewhere to manipulate the page. Quote Link to comment Share on other sites More sharing options...
cqpbert Posted July 13 Author Share Posted July 13 Hi Al, I am not sure I have the older version of ckeditor you are referring too. I simply update and remove setup folders. Or lately with managed hosting from you I think you update for me? DLLPDF.com I see #3573 has been closed with a mention of 6.5.6? Does this mean we simply need to update our stores? Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 13 Share Posted July 13 I have been scouring the CKEditor code and, while I haven't found it just yet, I believe they decided in the recent releases that script tags will not be allowed at all - no matter what! But the visual result is confusing. See: https://securitylab.github.com/advisories/GHSL-2022-009_ckeditor4/ Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 13 Share Posted July 13 So far, this is the best I could come up with: Using Smarty syntax to break apart the tag 'script': <pre> {'<scrip'}{'t>'} {'var x="Hello.";'} {'</scrip'}{'t>'} </pre> It's fugly as sin, and will require the admin to know about this trick, and to manage the quotes appropriately. Quote Link to comment Share on other sites More sharing options...
cqpbert Posted July 13 Author Share Posted July 13 So to do this I assume every line of the script would need {'.......'}? Yes that is REALLY fugly. Is there a better way for me to do this (almost certain there is). Like can I save the script on the server somewhere and call it for my page? The reason I wanted to embed it directly in the page was to be able to update it easily from an admin stand point like when constants need to change such as price or something. For now I guess I will continue to build the code outside the page then figure out how to make it a product. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted July 13 Share Posted July 13 Very fugly. I think I the best solution is to downgrade the right text editor. Quote Link to comment Share on other sites More sharing options...
cqpbert Posted July 13 Author Share Posted July 13 Al, How do I get the correct one? Is it buried somewhere in my files or do you have a copy somewhere? Can you replace it for main my main and my dev site? dllpdf.com and dev.dllpdf.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.