We’re using SiteOrigin Visual Composer on our website, but we copy/paste Oracle generated form code into our pages.
In doing so, the following “regex” is included inline of that code for javascript validation.
When we paste this:
([^@s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})$
Visual editor actually changes it to this:
([^@s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})$
Notice the backslashes (2 of them) are missing before the 1st ‘s’ & again between the ‘+’ & the ‘.’ on the version “saved” by visual composer. Seems like NONE of this should be stripping characters off.
Any ideas as to how or why this is being stripped off upon saving out “text mode” code in visual composer??
Hi Joe,
It was also stripped here. :(
Basically, it’s being filtered on the frontend and on the backend. To get past the backend filter, you’ll need to escape the backslash (two backslashes with no spaces \\). Just don’t save the page again or it’ll remove it.
To get past both, which depending on context might not be possible, you could also use the HTML entity for backslash \
>> . Just don't save the page again or it'll remove it.
Just to verify, can I save it one time with the \\ <smb://'> to get it to work correctly? then if we re-enter/update the page… we just need to be aware that it requires a \\ again?
Hi Joe,
Yes. Saving it once will lead to one of the slashes being stripped. Saving it again will lead to the remaining slash being stripped. To avoid this add another backslash to prevent both from being stripped.
Thank you for the clarification/confirmation.
Do you foresee a fix to this in the future (a refinement to the code)? Or is this just an implication of SQL storage & the code?
– Joe
Hi Joe,
A fix. It’s an issue with how we preparing the data for storage. This means that you won’t have to go make and update your old posts when the fix is made.
That’s great to hear, how do I keep in the loop on when a fix is released?
– Joe
Hi Joe,
If you have a GitHub account you can ask to be notified about through the issue created for this.
Done, subscribed for that notification.
Thanks for all the guidance/help.
– Joe
Hi Joe,
Happy to help! :)
Marking this as closed from a support standpoint.
I concur.
– Joe