The Only World-Standard SEO Software

SEO and Internet Marketing Forum
Welcome, Guest ( Login | Register )

"<" and ">" inside widget scripts [Bug]
New Topic Add Reply
Page 1 of 1 [ 2 posts ]
Author Message
speciallabs

Wizard

Wizard
Posts: 47
Posted: Tue Dec 27, 2016 5:19 pm

Hey there,

There's a nasty bug when you write a simple JS <script> tag inside a custom widget and put a simple condition like "if (x < 2) ;" - the widget cannot be saved because it triggers an "unclosed HTML tag" error, even though the "<" is part of JavaScript's comparison operators and used in the <script> tag, not part of the HTML code.

I had to create my own functions "lt", "lte", "gt", "gte" that use basic math to circumvent the impossibility of using the JavaScript comparison operators...

Again, this bug appears whenever you use the "<", "<=", ">=", ">" comparison operators within <script></script> tags as part of conditional statements.

LinkAssistant

User avatar
Site Admin
Posts: 5588
Posted: Tue Jan 03, 2017 8:56 am

The thing is that custom widgets do not support JavaScript or any other programming languages, so you will not be able to perform any calculations inside your custom widgets in any way, only simple HTML tags. Thus, the issue you describe is not quite a bug, but just the case when you try to apply an unsupported language into the widget - it will not work this way in any case, unfortunately.

Display topics from previous:    Sort by    
New Topic Add Reply
Page 1 of 1 [ 2 posts ]
All times are UTC

Jump to:  


cron