Add double-munging protection by checking if the domains are the same.
commit85090520f15a065b5e5f009d3b683b97cdcc8546
authorEdward Z. Yang <edwardzyang@thewritingpot.com>
Sun, 27 Jul 2008 04:45:19 +0000 (26 22:45 -0600)
committerEdward Z. Yang <edwardzyang@thewritingpot.com>
Sun, 27 Jul 2008 04:45:19 +0000 (26 22:45 -0600)
tree916158b37e83d98c081b743686477c71d2c1c1fd
parent3b6aa1059289718af710a86a9cc5acc1897996eb
Add double-munging protection by checking if the domains are the same.

Previously, if an absolute munge URL location was used, HTML passed through
HTML Purifier multiple times would be munged multiple times. This patch
checks if the output URI has the same URI as the input URI; if they do,
the munge is considered unnecessary and discarded.

Requested-by: Chris <justbittin@gmail.com>
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
NEWS
library/HTMLPurifier/URIFilter/Munge.php
tests/HTMLPurifier/URIFilter/MungeTest.php