View Single Post
Old 06-01-2020, 06:10 AM   #1005
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by warrimoo View Post
Yes, a regex like <script.*?</script> with dot all on seemed to find most entries in the editor and similar for noscript tags. For some reason a few of the script> tag entries weren't matched and were still present when I checked later.

Maybe I'm over-worrying about this as a vector for attack and should stop thinking of needing virus prevention at the point of adding a book. I can just run a 'scan' occasionally.
For your example, you probably need:

Code:
<noscript.*?<noscript>
But, a more general would be:

Code:
<((?:java|no)?script).*?<\/\1>
That should get them all. But, it won't handle any self-closed tags. Or any mismatched tags.
davidfor is offline   Reply With Quote