You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
I have a very specific situation in which I want to insert a code similar to the below using postscribe:
<img src="data:image/png,ft" style="display: none" onerror="
(function(img) {
console.log('dummy function');
console.log('that references ' + img);
//and also has a conditional sort of like this
if (10 > 8) { console.log('obviously'); } // MAIN ISSUE IS HERE
else { console.log('but only works with less than'); }
})(this);
">
I know it is quite a strange code but that's how we get it sometimes form clients. The issue is that the > sign in the conditional is being detected by postscribe as the closing > for the img, which is causing a data-ps-id to show up and break the js code...
Here's an example showing the code with a > sign and then again with a < sign. The one with < works fine and prints all the expected outputs.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a very specific situation in which I want to insert a code similar to the below using postscribe:
I know it is quite a strange code but that's how we get it sometimes form clients. The issue is that the > sign in the conditional is being detected by postscribe as the closing > for the img, which is causing a data-ps-id to show up and break the js code...
Here's an example showing the code with a > sign and then again with a < sign. The one with < works fine and prints all the expected outputs.
The text was updated successfully, but these errors were encountered: