Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29947567: Issue 5333 - Ensure links in metadata and in most tags can be made relative (Closed)

Created:
Nov. 20, 2018, 4:23 a.m. by rhowell
Modified:
Jan. 9, 2019, 10:54 p.m.
Reviewers:
Vasily Kuznetsov, wspee
CC:
juliandoucette
Base URL:
https://hg.adblockplus.org/cms/
Visibility:
Public.

Description

Noissue - Ensure links in metadata and in most tags can be made relative

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comments on PS1 #

Total comments: 4

Patch Set 3 : Address comments on PS2, format HTML #

Total comments: 2

Patch Set 4 : Combine regex in converters.py #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -53 lines) Patch
M cms/converters.py View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
R tests/expected_output/relative/de/rel_path View 1 2 1 chunk +30 lines, -16 lines 0 comments Download
R tests/expected_output/relative/en/rel_path View 1 2 1 chunk +30 lines, -16 lines 0 comments Download
R tests/test_site/pages/rel_path.html View 1 2 1 chunk +21 lines, -18 lines 0 comments Download
A tests/test_site/templates/head-test.tmpl View 1 2 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 8
rhowell
Nov. 20, 2018, 4:23 a.m. (2018-11-20 04:23:55 UTC) #1
rhowell
Hi Vasily and Winsley! Hopefully this patch will help 5333 work properly. Let me know ...
Nov. 20, 2018, 4:27 a.m. (2018-11-20 04:27:42 UTC) #2
Vasily Kuznetsov
Hi Rosie! Good catch on the absence of link processing in the head and the ...
Nov. 20, 2018, 7:35 p.m. (2018-11-20 19:35:45 UTC) #3
rhowell
Hey, thanks for the feedback! I implemented the suggestions, but have just a couple more ...
Nov. 21, 2018, 4:37 a.m. (2018-11-21 04:37:06 UTC) #4
Vasily Kuznetsov
Hi Rosie, Yeah, the main idea is right. Here are the answers to your questions ...
Nov. 21, 2018, 11:30 p.m. (2018-11-21 23:30:48 UTC) #5
rhowell
Hi Vasily and Winsley! Hope you had a nice time at the team week; the ...
Dec. 19, 2018, 2:33 a.m. (2018-12-19 02:33:31 UTC) #6
Vasily Kuznetsov
Hi Rosie, It seems that the team week was too good and this fell out ...
Jan. 4, 2019, 8:16 p.m. (2019-01-04 20:16:57 UTC) #7
rhowell
Jan. 7, 2019, 10:25 p.m. (2019-01-07 22:25:06 UTC) #8
Hi Vasily,

Thanks for finding this! I would have pinged you soon, if you didn't find it
first.  :)

https://codereview.adblockplus.org/29947567/diff/29964558/cms/converters.py
File cms/converters.py (right):

https://codereview.adblockplus.org/29947567/diff/29964558/cms/converters.py#n...
cms/converters.py:329: text =
re.sub(r'(<[\w]+\s[^<>]*\b(href)=\")([^<>\"]+)(\")',
On 2019/01/04 20:16:56, Vasily Kuznetsov wrote:
> Perhaps at this point it makes sense to combine these two regexps into one,
with
> "(href|src)" in the middle, since they are identical except for just this one
> piece. What do you think?

Good idea, done.

Powered by Google App Engine
This is Rietveld