[art-web] [views] don't confuse the w3 validator with tags in javascript



commit 6dcb2bc2ac540d98aceac42c17d501c25d2ed51d
Author: Thomas Wood <thos gnome org>
Date:   Mon Nov 16 00:12:58 2009 +0000

    [views] don't confuse the w3 validator with tags in javascript
    
    Escape the closing tags when written by javascript to avoid confusing
    the w3 html validator.
    
    See: http://www.htmlhelp.com/tools/validator/problems.html#script

 views/backgrounds.php |    2 +-
 views/themes.php      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/views/backgrounds.php b/views/backgrounds.php
index 8d2ebf3..0595e9a 100644
--- a/views/backgrounds.php
+++ b/views/backgrounds.php
@@ -99,7 +99,7 @@ String.prototype.rot13 = rot13 = function(s)
 <div class="list-item">
     <b><?php echo $row['name']?></b>
     <br>
-    <span class="item-detail">by <script type='text/javascript'>document.write ('<a href="mailto:' + '<?php echo str_rot13 ($row['email'])?>'.rot13() + '">');</script><?php echo $row['realname']?><script type='text/javascript'>document.write ('</a>');</script></span>
+    <span class="item-detail">by <script type='text/javascript'>document.write ('<a href="mailto:' + '<?php echo str_rot13 ($row['email'])?>'.rot13() + '">');</script><?php echo $row['realname']?><script type='text/javascript'>document.write ('<\/a>');</script></span>
     <br><span class="item-detail"><?php echo $license_config_link_array[$row['license']]?></span>
     <br>
     <img width="96" alt="Preview" src='/images/thumbnails/backgrounds/<?php echo $row['thumbnail_filename']?>'>
diff --git a/views/themes.php b/views/themes.php
index c7404da..dceb451 100644
--- a/views/themes.php
+++ b/views/themes.php
@@ -88,7 +88,7 @@ String.prototype.rot13 = rot13 = function(s)
 
 <div class="list-item">
   <b><?php echo $row['name']?></b>
-  <br><span class="item-detail"> by <script type='text/javascript'>document.write ('<a href="mailto:' + '<?php echo str_rot13 ($row['email'])?>'.rot13() + '">');</script><?php echo $row['realname']?><script type='text/javascript'>document.write ('</a>');</script></span>
+  <br><span class="item-detail"> by <script type='text/javascript'>document.write ('<a href="mailto:' + '<?php echo str_rot13 ($row['email'])?>'.rot13() + '">');</script><?php echo $row['realname']?><script type='text/javascript'>document.write ('<\/a>');</script></span>
    <br><span class="item-detail"><?php echo $license_config_link_array[$row['license']]?></span>
   <br>
   <img style="margin:0.5em;" width="96" alt="Preview" src='/images/thumbnails/<?php echo $row['category']?>/<?php echo $row['thumbnail_filename']?>'>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]