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

Side by Side Diff: templates/sitekey_frame.tmpl

Issue 29329256: Issue 3122 - Restrict allowed URLs for the sitekey_frame (Closed)
Patch Set: Created Oct. 16, 2015, 12:25 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 return parent_location.hash.substring(1); 7 var href = parent_location.href;
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);
8 } 12 }
9 </script> 13 </script>
10 {% endblock %} 14 {% endblock %}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld