Fork me on GitHub

Django test case

1371 bytes of Django by mark

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
<!-- adapted from the PHP embedded test -->
<html>
  <head>  
  <title>{{ title }}</title>
  <sometag>{{ something }}</sometag>
  <script type='javascript'>
  document.getElementById('content').innerHTML += {{ something }}
  /*  COMMENT  {{ this is not a comment }}
    this is  {% this isnt %}  */
  var str = "this is{{ ' a ' }}string";
  var str = 'this is{{ ' a '; }} string';
  // this is {{ 'a}}' }} comment {{ '' }} ... still

  var xml = <tag1 x='y'>
    <tag2> "hello </tag2>
    <tag{{ }} x=y/>
    <tag> {{ }} </tag>
    </tag1>;

  // abcdef {%      %} 09876543 </script>
  <script src=blahblah></script>
  <style type='text/css'>
  /*   comment {% print "123" %}      still a comment {# comment #} }} */
  a:visited {
    font-weight: bold;
    background-image: url({{ '"/image.png"' }});
  }
  a[name="{{ 'something' }}"] {
    font-weight: bold;
    background-image: url("{{/image2.png}}");
  }  
  </style>

  <body>
  <div id="c{{ 'onten'}}t" blah> blah {{ '' }} </div>
  <div id="c{{ 'o' }}>nt{% print 'en' %} t" blah> blah {{ '' }} </div>
  <div id='c{{ 'onten' }}>t' blah> blah {{ '' }} </div>
  <div id='c{% print 'o' %}>nt{{ 'en' }} t' blah> blah {{ '' }} </div>
  
  <!-- {% print 'hello' %} //-->

  <! {% print 'hello' %} -->

  not a comment
  {# is a comment #}

  <div><![CDATA[ cdata
  {{ '' }}
  {{ '' }}
  {{ ']]>' }}
  cdata
  ]]></div>