dartiss / code-embed

WordPress plugin to make embedding of code in posts really, really easy
https://wordpress.org/plugins/simple-embed-code/
GNU General Public License v2.0
24 stars 6 forks source link

WP blocks the update/add new custom field with "onClick='this.select();" #35

Open OpossumPetya opened 5 years ago

OpossumPetya commented 5 years ago

Tried to add bookmarklet code to the post, but WP now blocks the update/add new custom field when there's JS events(?), error 403 in browser console:

<a href="javascript:(function(){var%20t=location.protocol+$(%22img[class*='postcard-image']%22).attr(%22src%22);$(%22img[class*='postcard-image']%22).after(%22%3Cp%3E%3Cbr/%3E%3Cinput%20type='text'%20style='width:500px'%20onClick='this.select();'%20value='%22+t+%22'%20/%3E%3C/p%3E%22)})();">Postcard Image Address</a>

Once I removed onClick='this.select(); it was accepted.

Edit: WordPress - 5.2.3 Code Embed - 2.3.2

OpossumPetya commented 5 years ago

It's probably not plugin's fault, but just FYI. Also, it wasn't happening before (though, probably last time I was updating this bookmarklet was at least a year ago).

dartiss commented 5 years ago

Thanks for letting me know - I'll take a look into it 👍🏼