Use Sanitizer::stripAllTags( $x ) instead of html_entity_decode( strip_tags( $x ) )
authorRoan Kattouw <roan.kattouw@gmail.com>
Fri, 7 Jul 2017 23:35:07 +0000 (16:35 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Fri, 7 Jul 2017 23:53:53 +0000 (16:53 -0700)
commit12109163292063cdbb4901c64b7f46d094f6694e
tree3b68d5e54413fb380ed06d5cccbe01cfe87cd581
parent8a16f5791fc975c1f57a518ecdfb9e20c863df12
Use Sanitizer::stripAllTags( $x ) instead of html_entity_decode( strip_tags( $x ) )

We have a utility function for this, so let's use it.

What I don't understand though is why Sanitizer uses custom PHP implementations
for both tag stripping and entity decoding, instead of the built-in functions.
If there's a security reason for this or the built-ins are inadequate, that's
fine, but then that should be documented (and we should possibly ban usage
of the built-ins).

Change-Id: I2ba2ecd388cb3d9cd2360ecaa236f3d444f0eabf
includes/api/ApiErrorFormatter.php
includes/exception/LocalizedException.php
includes/installer/CliInstaller.php
includes/specials/SpecialRecentchanges.php