Hey hi,

Thanks for this filter! I had an issue where the regex didn't match the <table> tag, so I made a small patch.

The table was marked up like this:

<table border="1" cellpadding="1" cellspacing="1">

Comments

immoreel created an issue. See original summary.

immoreel’s picture

StatusFileSize
new756 bytes
immoreel’s picture

Issue summary: View changes
mark_fullmer’s picture

Thanks for this, immoreel. I'm happy to incorporate this, but I'd first like to double check something.

For me, the original preg_replace() parameter successfully finds and replaces <table border="1" cellpadding="1" cellspacing="1">, so I'm wondering what <table[^>]*> will catch that <table(.*)> doesn't. I understand that ^ is going to look for "ends with," but I don't see how that's functionally different from a wildcard that goes until it reaches ">". Is this a difference in PHP 5 versions?

immoreel’s picture

I think it has to do with the formatting of the markup, check out

this
versus
this

mark_fullmer’s picture

Good demonstration. Thanks, immoreel. The regex is updated.

mark_fullmer’s picture

Status: Active » Fixed
mark_fullmer’s picture

Status: Fixed » Closed (fixed)