zdev

Thursday, June 01, 2006

Newline filter test

When posted to Blogger which has property convertNewLine (such as Paalin blog or joey Typepad via Atom), linebreaks are converted to <br/> tags. To handle this all newlines (\n) are stripped before posting. What this mean is that any content that must preserve space such as <pre>, <script> and will be inlined.

This is a test post where Z strips newlines from the post content except where it should be preserved (pre and script). Best way to verify this is to view the source - or look at the posted content via online editor. This post should have the following script:

  <script type="text/javascript" >
   function calculate(num1, num2)
   {
     var total = num1 + num2;
   }
  </script>

If you view the source, the <pre> tag and the <script> tag should preserve its space. The rest will be inline - i.e. stripped of new lines.End of Post.

0 Comments:

Post a Comment

<< Home