Merge lp:~stolowski/unity-lens-shopping/markup-cleaner-fix into lp:unity-lens-shopping
Proposed by
Paweł Stołowski
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Michal Hruby | ||||
Approved revision: | 31 | ||||
Merged at revision: | 26 | ||||
Proposed branch: | lp:~stolowski/unity-lens-shopping/markup-cleaner-fix | ||||
Merge into: | lp:unity-lens-shopping | ||||
Diff against target: |
345 lines (+273/-26) 5 files modified
Makefile.am (+1/-1) configure.ac (+1/-0) src/markup-cleaner.vala (+59/-25) tests/unit/Makefile.am (+28/-0) tests/unit/test-markup-cleaner.vala (+184/-0) |
||||
To merge this branch: | bzr merge lp:~stolowski/unity-lens-shopping/markup-cleaner-fix | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michal Hruby (community) | Approve | ||
Review via email: mp+127275@code.launchpad.net |
Commit message
Fixed regular expression for capturing html tags; fixed replace_cb logic and added unit tests for MarkupCleaner.
Description of the change
Fixed regular expression for capturing html tags; fixed replace_cb logic and added unit tests for MarkupCleaner.
To post a comment you must log in.
40 + internal static const string HTML_MARKUP_RE = "(</?)\ \s*([^> ]*?)\\s* (/?>)|( \\&(?!( ([a-z]+ )|(#\\d+ ));))";
> (?!(([a-z]+) -> perhaps (?!(\S{1,6})) instead? (the entities can be uppercase and have digits)
Pls add `<a href="wooo" ><small> Click me!</small></a>` to the unit tests.