• Brion Vibber's avatar
    Fix issue #3035: search highlighting broke URLs in some imported messages (Twitter) · 8e7c279c
    Brion Vibber authored
    Search highlighting was being done with a regex on raw HTML text, followed by a second regex undoing replacements within double-quoted attribute values.
    This broke on imported Twitter messages, as the way we generate the markup uses single quotes on the attributes, which didn't get matched by the second regex.
    I've replaced this do-then-undo cycle by dividing up the import HTML into freetext spans and tags; the freetext gets replaced, while the tags are left untouched.
    8e7c279c
noticesearch.php 6.35 KB