Topic on Extension talk:AbuseFilter

How to use "str_replace_regexp()" ?

3
Erik Baas (talkcontribs)

Is it possible to let an abusefilter replace unwanted text, like deprecated HTML tags and possibly other lint errors? My goal was to silently replace <br /> with <br> (just an example!!), without annoying them. I tried this:

new_wikitext = str_replace_regexp(new_wikitext,"\<\/?br\/\>","<br>")

but that's no good. Can it be done, and if so, how? - ~~~~

Lustiger seth (talkcontribs)

hi!
the filter does never change a page. it's a read-only tool.
string modification operations can be used to modify some strings in the memory of the filter only. -- seth (talk) 08:07, 19 March 2023 (UTC)

Erik Baas (talkcontribs)

OK, thank you.