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

Issue 29332874: Issue 3435 - strip "index" from page path for canonical URL (Closed)

Created:
Dec. 18, 2015, 10:28 a.m. by saroyanm
Modified:
Dec. 18, 2015, 12:56 p.m.
CC:
Felix Dahlke
Visibility:
Public.

Description

Issue 3435 - strip "index" from page path for canonical URL

Patch Set 1 #

Total comments: 5

Patch Set 2 : Went with Wladimir suggestion #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
A filters/stripindex.py View 1 1 chunk +5 lines, -0 lines 0 comments Download
M templates/default.tmpl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6
saroyanm
@Sebastian can you please have a look when you have time.
Dec. 18, 2015, 10:29 a.m. (2015-12-18 10:29:52 UTC) #1
Wladimir Palant
https://codereview.adblockplus.org/29332874/diff/29332875/filters/stripindex.py File filters/stripindex.py (right): https://codereview.adblockplus.org/29332874/diff/29332875/filters/stripindex.py#newcode3 filters/stripindex.py:3: return path[:-5] This logic is wrong - imagine a ...
Dec. 18, 2015, 10:58 a.m. (2015-12-18 10:58:15 UTC) #2
saroyanm
New patch uploaded. https://codereview.adblockplus.org/29332874/diff/29332875/filters/stripindex.py File filters/stripindex.py (right): https://codereview.adblockplus.org/29332874/diff/29332875/filters/stripindex.py#newcode3 filters/stripindex.py:3: return path[:-5] On 2015/12/18 10:58:15, Wladimir ...
Dec. 18, 2015, 11:10 a.m. (2015-12-18 11:10:15 UTC) #3
Wladimir Palant
https://codereview.adblockplus.org/29332874/diff/29332875/filters/stripindex.py File filters/stripindex.py (right): https://codereview.adblockplus.org/29332874/diff/29332875/filters/stripindex.py#newcode3 filters/stripindex.py:3: return path[:-5] In fact, given that this logic is ...
Dec. 18, 2015, 11:13 a.m. (2015-12-18 11:13:44 UTC) #4
saroyanm
https://codereview.adblockplus.org/29332874/diff/29332875/filters/stripindex.py File filters/stripindex.py (right): https://codereview.adblockplus.org/29332874/diff/29332875/filters/stripindex.py#newcode3 filters/stripindex.py:3: return path[:-5] On 2015/12/18 11:13:44, Wladimir Palant wrote: > ...
Dec. 18, 2015, 11:24 a.m. (2015-12-18 11:24:19 UTC) #5
Wladimir Palant
Dec. 18, 2015, 11:58 a.m. (2015-12-18 11:58:32 UTC) #6
LGTM

https://codereview.adblockplus.org/29332874/diff/29332875/filters/stripindex.py
File filters/stripindex.py (right):

https://codereview.adblockplus.org/29332874/diff/29332875/filters/stripindex....
filters/stripindex.py:3: return path[:-5]
On 2015/12/18 11:24:18, saroyanm wrote:
> IMO it will affect readability of template file, I think this implementation
> doesn't belong to template. I'd vote for keeping it separate, but will move to
> template if you insist.

Fair enough.

Powered by Google App Engine
This is Rietveld