Changes between Version 35 and Version 36 of DeveloperGuidelines/CodeConventions


Ignore:
Timestamp:
11/16/13 23:25:08 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/CodeConventions

    v35 v36  
    3131
    3232- for XML/HTML attributes use double-quotes {{{" "}}} (inner quotes must be escaped anyway)
     33
     34Note that this:
     35{{{
     36#!Python
     37inline_javascript = '''sometext="%s";''' % sometext
     38}}}
     39is a potential bug - the JavaScript breaks when {{{sometext}}} contains a {{{"}}}.
     40
     41A safer way to do that is:
     42{{{
     43#!Python
     44inline_javascript = '''sometext=%s;''' % json.dumps(sometext)
     45}}}
    3346=== Naming conventions ===
    3447