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

Delta Between Two Patch Sets: templates/sitekey_frame.tmpl

Issue 29329256: Issue 3122 - Restrict allowed URLs for the sitekey_frame (Closed)
Left Patch Set: Created Oct. 16, 2015, 12:25 p.m.
Right Patch Set: Gone with Manvel's suggestion Created Nov. 19, 2015, 12:54 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 {% extends "frame.tmpl" %} 1 {% extends "frame.tmpl" %}
2 2
3 {% block body %} 3 {% block body %}
4 <script type="text/javascript"> 4 <script type="text/javascript">
5 function frame_url(parent_location) 5 function frame_url(parent_location)
6 { 6 {
7 var href = parent_location.href; 7 return parent_location.origin + parent_location.hash.substring(1);
8 var hash = parent_location.hash;
9 return base_href = href.substr(
saroyanm 2015/11/16 13:53:25 The description says Restrict allowed URLs for the
kzar 2015/11/16 23:01:09 So the sitekey_frame page contains a big iFrame an
saroyanm 2015/11/17 11:28:33 I see. What about: return parent_location.origin +
kzar 2015/11/19 12:56:00 Good point, much better. Done.
10 0, href.length - hash.length - parent_location.pathname.length
11 ) + hash.substring(1);
12 } 8 }
13 </script> 9 </script>
14 {% endblock %} 10 {% endblock %}
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld