js = js_template % simplejson.dumps(args)
# If the YUI widget or javascript is not supported in the browser,
# it will degrade to being this "Find..." link instead of the
@@ -154,8 +163,7 @@
css = ''
return ('<span class="%s">(<a id="%s" href="/people/">' 'Find…</a>)</span>'
- '\n<script>\n%s\n</script>'
- ) % (css, self.show_widget_id, js)
+ '\n<script>\n%s\n</script>') % (css, self.show_widget_id, js)
It's not part of your change, but using simplejson.dumps() can be
hazardous for embedding javascript into <script> tags. See:
Hi Curtis. Some incredibly minor comments, +1.
[1]
js = js_template % simplejson. dumps(args)
'Find& hellip; </a>)</ span>' \n%s\n< /script> ' widget_ id, js) \n%s\n< /script> ') % (css, self.show_ widget_ id, js)
# If the YUI widget or javascript is not supported in the browser,
# it will degrade to being this "Find..." link instead of the
@@ -154,8 +163,7 @@
css = ''
return ('<span class="%s">(<a id="%s" href="/people/">'
- '\n<script>
- ) % (css, self.show_
+ '\n<script>
It's not part of your change, but using simplejson.dumps() can be
hazardous for embedding javascript into <script> tags. See:
http:// code.google. com/p/simplejso n/issues/ detail? id=66
Instead the following should be used:
simplejson. dumps(args, cls=simplejson. encoder. JSONEncoderForH TML)
Or:
simplejson. encoder. JSONEncoderForH TML().encode( obj)
[2]
+ Y.lp.registry. team.setup_ add_member_ handler(
+ '${step_title}');
The lack of escaping and all that jazz makes me a little uneasy, but
it's not user-supplied so I'm not too worried.
[3]
+ def test_open_ team_cannot_ be_a_member_ or_a_closed_ team(self) :
s/or/of/
[4]
+ def test_open_ team_can_ be_a_member_ or_an_open_ team(self) :
s/or/of/
[5]
+ return 'Search for a restricted or moderated team or person'
This could be parsed as:
Search for a (restricted or moderated) (team or person)
Perhaps the following would be less ambiguous:
Search for a restricted team, a moderated team, or a person
?
[6]
+ Person. subscriptionpol icy != TeamSubscriptio nPolicy. OPEN)
Maybe it's worth taking a defensive approach here (to someone adding nPolicy member) instead:
another TeamSubscriptio
In(Person. subscriptionpol icy, ( riptionPolicy. RESTRICTED, riptionPolicy. MODERATED) )
TeamSubsc
TeamSubsc
The same clause appears twice.