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">
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | responsive_tables_filter-regex-2558209.patch | 756 bytes | immoreel |
Comments
Comment #2
immoreel commentedComment #3
immoreel commentedComment #4
mark_fullmerThanks 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?Comment #5
immoreel commentedI think it has to do with the formatting of the markup, check out
this
versus
this
Comment #6
mark_fullmerGood demonstration. Thanks, immoreel. The regex is updated.
Comment #7
mark_fullmerComment #8
mark_fullmer