<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,7 +3,7 @@
 &lt;div id=&quot;page-nav&quot;&gt;
   &lt;ul id=&quot;act-nav&quot; class=&quot;clear&quot;&gt;
     &lt;% if controller.controller_name == 'comments' &amp;&amp; controller.action_name == 'index' &amp;&amp; @comments.size &gt; 0 -%&gt;
-      &lt;li&gt;&lt;%= link_to_remote &quot;Delete these #{@filter != 'all' ? @filter : ''} comments&quot;, :confirm =&gt; &quot;Are you sure you wish to delete all #{@filter != 'all' ? @filter : ''} comments?&quot;,
+      &lt;li&gt;&lt;%= link_to_remote h(&quot;Delete these #{@filter != 'all' ? @filter : ''} comments&quot;), :confirm =&gt; &quot;Are you sure you wish to delete all #{@filter != 'all' ? @filter : ''} comments?&quot;,
           :url =&gt; { :controller =&gt; 'comments', :action =&gt; 'destroy', :id =&gt; @article }, :with =&gt; &quot;ArticleForm.getAvailableComments().toQueryString('comment')&quot;
         %&gt;&lt;/li&gt;
     &lt;% end -%&gt;
@@ -57,4 +57,4 @@
     &lt;% end -%&gt;
   &lt;/ul&gt;
 &lt;/div&gt;
-&lt;% end unless @article &amp;&amp; @article.new_record? &amp;&amp; @article.comments.size == 0 -%&gt;
\ No newline at end of file
+&lt;% end unless @article &amp;&amp; @article.new_record? &amp;&amp; @article.comments.size == 0 -%&gt;</diff>
      <filename>app/views/admin/articles/_page_nav.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -52,7 +52,7 @@
     &lt;h3&gt;Some stats&lt;/h3&gt;
     &lt;p&gt;
       You have a uploaded a total of &lt;strong&gt;&lt;%= pluralize site.assets.count, 'asset'%&gt;&lt;/strong&gt;, using
-      &lt;strong&gt;&lt;%= number_to_human_size site.assets.sum(:size) %&gt;&lt;/strong&gt;.
+      &lt;strong&gt;&lt;%=h number_to_human_size site.assets.sum(:size) %&gt;&lt;/strong&gt;.
     &lt;/p&gt;
   &lt;/div&gt;
 &lt;% end %&gt;</diff>
      <filename>app/views/admin/assets/index.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 
 &lt;h3 style=&quot;border-bottom:1px solid #ccc;padding:5px&quot;&gt;
 &lt;% if @article -%&gt;
-Comments on &lt;%= link_to @article.title, edit_article_path(@article), :style =&gt; 'border:none' %&gt; &lt;span class=&quot;right&quot;&gt;&lt;%= @article.published? ? link_to(image_tag('/images/mephisto/icons/24-zoom-in.png', :style =&gt; 'vertical-align: middle'), @site.permalink_for(@article), :style =&gt; 'border:none;') : '&amp;nbsp;' %&gt;&lt;/span&gt;
+Comments on &lt;%= link_to h(@article.title), edit_article_path(@article), :style =&gt; 'border:none' %&gt; &lt;span class=&quot;right&quot;&gt;&lt;%= @article.published? ? link_to(image_tag('/images/mephisto/icons/24-zoom-in.png', :style =&gt; 'vertical-align: middle'), @site.permalink_for(@article), :style =&gt; 'border:none;') : '&amp;nbsp;' %&gt;&lt;/span&gt;
 &lt;% else -%&gt;
 Comments for all articles
 &lt;% end -%&gt;
@@ -22,7 +22,7 @@ Comments for all articles
     &lt;blockquote&gt;&lt;p&gt;&quot;&lt;%= strip_tags(comment.body) %&gt;&quot;&lt;/p&gt;&lt;/blockquote&gt;
     &lt;% end -%&gt;
     &lt;span class=&quot;meta&quot;&gt;
-      &lt;cite&gt;&amp;mdash; &lt;%= author_link_for comment %&gt;&lt;%= %( (#{comment.author_email})) unless comment.author_email.blank? %&gt; said &lt;%=  time_ago_in_words comment.created_at %&gt; ago&lt;/cite&gt;
+      &lt;cite&gt;&amp;mdash; &lt;%= author_link_for comment %&gt;&lt;%=h %( (#{comment.author_email})) unless comment.author_email.blank? %&gt; said &lt;%=h time_ago_in_words comment.created_at %&gt; ago&lt;/cite&gt;
     
     &lt;%= link_to_remote 'Edit', :url =&gt; edit_article_comment_path(comment.article, comment), :method =&gt; :get %&gt; |
     &lt;% if comment.approved? -%&gt;</diff>
      <filename>app/views/admin/comments/index.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,16 @@
 &lt;div class=&quot;group&quot;&gt;
   &lt;dl&gt;
     &lt;dt&gt;
-      &lt;%= label_tag :data, labels[:data] %&gt;
+      &lt;%= label_tag :data, h(labels[:data]) %&gt;
       &lt;p class=&quot;hint&quot;&gt;&lt;%= hint %&gt;&lt;/p&gt;
     &lt;/dt&gt;
     &lt;dd&gt;&lt;%= text_area_tag :data, h(attachment &amp;&amp; attachment.file? ? attachment.read : params[:data]), :class =&gt; 'fat', :rows =&gt; 20 %&gt;&lt;/dd&gt;
     &lt;% if controller.action_name == 'index' -%&gt;
     &lt;dt&gt;
-      &lt;%= label_tag :filename, labels[:filename] %&gt;
+      &lt;%= label_tag :filename, h(labels[:filename]) %&gt;
       &lt;p class=&quot;hint&quot;&gt;You can create one of three types of files: Liquid (*.liquid), CSS (*.css), and Javascript (*.js).&lt;/p&gt;
     &lt;/dt&gt;
     &lt;dd&gt;&lt;%= text_field_tag :filename, params[:filename] %&gt;&lt;/dd&gt;
     &lt;% end -%&gt;
   &lt;/dl&gt;
-&lt;/div&gt;
\ No newline at end of file
+&lt;/div&gt;</diff>
      <filename>app/views/admin/design/_form.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -4,18 +4,18 @@
   *_layout suffix (e.g custom_layout).&lt;/p&gt;
 &lt;ul id=&quot;attachments&quot;&gt;
   &lt;% @theme.templates.template_types(@theme.extension).each do |template| -%&gt;
-    &lt;li&gt;&lt;%= link_to template, url_for_theme(:controller =&gt; 'templates', :action =&gt; 'edit', :filename =&gt; template) %&gt;&lt;/li&gt;
+    &lt;li&gt;&lt;%= link_to h(template), url_for_theme(:controller =&gt; 'templates', :action =&gt; 'edit', :filename =&gt; template) %&gt;&lt;/li&gt;
   &lt;% end -%&gt;
   &lt;% @theme.templates.custom(@theme.extension).each_with_index do |template, i| -%&gt;
     &lt;li id=&quot;templates-&lt;%= i %&gt;&quot;&gt;
       &lt;%= delete_link :templates, template, &quot;templates-#{i}&quot; %&gt;
-      &lt;%= link_to template, url_for_theme(:controller =&gt; 'templates', :action =&gt; 'edit', :filename =&gt; template) %&gt;
+      &lt;%= link_to h(template), url_for_theme(:controller =&gt; 'templates', :action =&gt; 'edit', :filename =&gt; template) %&gt;
     &lt;/li&gt;
   &lt;% end -%&gt;
   &lt;% @theme.resources.reject { |r| @theme.resources.image?(r) }.each_with_index do |resource, i| -%&gt;
     &lt;li id=&quot;resources-&lt;%= i %&gt;&quot;&gt;
       &lt;%= delete_link :resources, resource.basename.to_s, &quot;resources-#{i}&quot; %&gt;
-      &lt;%= link_to resource.basename, url_for_theme(:controller =&gt; 'resources', :action =&gt; 'edit', :filename =&gt; resource.basename) %&gt;
+      &lt;%= link_to h(resource.basename), url_for_theme(:controller =&gt; 'resources', :action =&gt; 'edit', :filename =&gt; resource.basename) %&gt;
     &lt;/li&gt;
   &lt;% end -%&gt;
 &lt;/ul&gt;
@@ -25,7 +25,7 @@
 &lt;p&gt;Select an image to use in your template.&lt;/p&gt;
 &lt;ul id=&quot;attachments&quot;&gt;
   &lt;% @theme.resources.select { |r| @theme.resources.image?(r) }.each_with_index do |image, i| -%&gt;
-    &lt;li id=&quot;images-&lt;%= i %&gt;&quot;&gt;&lt;%= delete_link :resources, image.basename.to_s, &quot;images-#{i}&quot; %&gt; &lt;%=  image.basename %&gt; &lt;/li&gt;
+    &lt;li id=&quot;images-&lt;%= i %&gt;&quot;&gt;&lt;%= delete_link :resources, h(image.basename.to_s), &quot;images-#{i}&quot; %&gt; &lt;%= h(image.basename) %&gt; &lt;/li&gt;
   &lt;% end -%&gt;
 &lt;/ul&gt;
 </diff>
      <filename>app/views/admin/design/_sidebar.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -49,7 +49,7 @@
     &lt;h3&gt;Recent activity&lt;/h3&gt;
     &lt;ul class=&quot;slist&quot; id=&quot;activity&quot;&gt;
       &lt;% @users.each do |user| -%&gt;
-        &lt;li style=&quot;clear:right;&quot;&gt;&lt;%= avatar_for user %&gt;&lt;%= link_to who(user.login), :controller =&gt; 'users', :action =&gt; 'show', :id =&gt; user %&gt;&lt;br /&gt; showed up &lt;%= distance_of_time_in_words_to_now(user.updated_at) %&gt; ago&lt;/li&gt;
+        &lt;li style=&quot;clear:right;&quot;&gt;&lt;%= avatar_for user %&gt;&lt;%= link_to who(user.login), :controller =&gt; 'users', :action =&gt; 'show', :id =&gt; user %&gt;&lt;br /&gt; showed up &lt;%=h distance_of_time_in_words_to_now(user.updated_at) %&gt; ago&lt;/li&gt;
       &lt;% end -%&gt;
     &lt;/ul&gt;
   &lt;/div&gt;</diff>
      <filename>app/views/admin/overview/index.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,12 @@
-    &lt;li class=&quot;theme&lt;%= ' current' if theme.current? %&gt;&quot; id=&quot;theme-&lt;%= theme_counter %&gt;&quot;&gt;
+    &lt;li class=&quot;theme&lt;%=h ' current' if theme.current? %&gt;&quot; id=&quot;theme-&lt;%= theme_counter %&gt;&quot;&gt;
       &lt;h3&gt;
-        &lt;span title=&quot;stored in /&lt;%= theme.name %&gt;&quot;&gt;&lt;%=h theme.title %&gt;&lt;/span&gt;
+        &lt;span title=&quot;stored in /&lt;%=h theme.name %&gt;&quot;&gt;&lt;%=h theme.title %&gt;&lt;/span&gt;
         &lt;span class=&quot;thememeta&quot;&gt;
           &lt;% unless theme.version.blank? -%&gt;v&lt;%=h theme.version %&gt; |&lt;% end -%&gt;
-          by &lt;%= theme.linked_author.blank? ? 'unknown' : theme.linked_author %&gt;
+          by &lt;%=h theme.linked_author.blank? ? 'unknown' : theme.linked_author %&gt;
         &lt;/span&gt;
       &lt;/h3&gt;
       &lt;a id=&quot;theme-dialog-&lt;%= theme_counter %&gt;&quot; class=&quot;theme_dialog&quot;&gt;
       &lt;img src=&quot;&lt;%= url_for(:controller =&gt; '/admin/themes', :action =&gt; 'preview_for', :id =&gt; theme) %&gt;&quot; alt=&quot;Theme preview&quot; title=&quot;&lt;%=h theme.title %&gt; (v&lt;%=h theme.version %&gt;)&quot; /&gt;
       &lt;/a&gt;
-    &lt;/li&gt;
\ No newline at end of file
+    &lt;/li&gt;</diff>
      <filename>app/views/admin/themes/_theme.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
   &lt;head&gt;
     &lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;   
-    &lt;title&gt;&lt;%= site.title %&gt;: Admin &lt;%= controller.controller_name %&gt;&lt;/title&gt;
+    &lt;title&gt;&lt;%=h site.title %&gt;: Admin &lt;%=h controller.controller_name %&gt;&lt;/title&gt;
     &lt;%= stylesheet_link_tag 'mephisto/mephisto' %&gt;
     &lt;%= javascript_include_tag 'mephisto/prototype', 'mephisto/effects', 'mephisto/dragdrop', 'mephisto/lowpro', 'mephisto/application' %&gt;
     &lt;script type=&quot;text/javascript&quot;&gt;Mephisto.root = '&lt;%= relative_url_root %&gt;'; &lt;%= init_mephisto_authenticity_token %&gt;&lt;/script&gt;
@@ -36,7 +36,7 @@
             &lt;li&gt;&lt;%= link_to 'Articles',  :controller =&gt; '/admin/articles' %&gt;&lt;/li&gt;
             &lt;li&gt;&lt;%= link_to 'Assets',    :controller =&gt; '/admin/assets' %&gt;&lt;/li&gt;
           &lt;% Mephisto::Plugin.tabs.each do |tab| -%&gt;
-            &lt;li&gt;&lt;%= link_to tab.first, tab.last %&gt;&lt;/li&gt;
+            &lt;li&gt;&lt;%= link_to h(tab.first), tab.last %&gt;&lt;/li&gt;
           &lt;% end -%&gt;
           &lt;/ul&gt;
           &lt;% if admin? -%&gt;
@@ -49,7 +49,7 @@
             &lt;li&gt;&lt;%= link_to 'Plugins',  :controller =&gt; '/admin/plugins' %&gt;&lt;/li&gt;
 					&lt;% end -%&gt;
           &lt;% Mephisto::Plugin.admin_tabs.each do |tab| -%&gt;
-            &lt;li&gt;&lt;%= link_to tab.first.to_s.tableize.humanize, tab.last %&gt;&lt;/li&gt;
+            &lt;li&gt;&lt;%= link_to h(tab.first.to_s.tableize.humanize), tab.last %&gt;&lt;/li&gt;
           &lt;% end -%&gt;
           &lt;/ul&gt;
           &lt;% end -%&gt;
@@ -80,8 +80,8 @@
         &lt;!-- div.left --&gt;
         &lt;div id=&quot;main&quot;&gt;
           &lt;div id=&quot;flashes&quot;&gt;
-            &lt;div id=&quot;flash-errors&quot; style=&quot;display: none;&quot;&gt;&lt;%= flash[:error] %&gt;&lt;/div&gt;
-            &lt;div id=&quot;flash-notice&quot; style=&quot;display:none&quot;&gt;&lt;%= flash[:notice] %&gt;&lt;/div&gt;
+            &lt;div id=&quot;flash-errors&quot; style=&quot;display: none;&quot;&gt;&lt;%=h flash[:error] %&gt;&lt;/div&gt;
+            &lt;div id=&quot;flash-notice&quot; style=&quot;display:none&quot;&gt;&lt;%=h flash[:notice] %&gt;&lt;/div&gt;
           &lt;/div&gt;
           &lt;!-- begin action nav --&gt;
           &lt;%= yield :action_nav %&gt;</diff>
      <filename>app/views/layouts/application.rhtml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f9d3c105eb0c22b7a66430619be41b697c98200f</id>
    </parent>
  </parents>
  <author>
    <name>Eric Kidd</name>
    <login>emk</login>
    <email>git@randomhacks.net</email>
  </author>
  <url>http://github.com/emk/mephisto/commit/a83309dbc833ce1ef255ac65275ba498115d1040</url>
  <id>a83309dbc833ce1ef255ac65275ba498115d1040</id>
  <committed-date>2008-12-11T15:31:50-08:00</committed-date>
  <authored-date>2008-12-11T15:29:51-08:00</authored-date>
  <message>Security: Escape strings where recommended by SafeERB

The SafeERB plugin attempts to automatically detect view code which
fails to properly escape HTML.  You can find information here:

  http://wiki.rubyonrails.com/rails/pages/Safe+ERB

I'm using a version of SafeERB modified by Matthew Bass, which can be
found on github:

  http://github.com/pelargir/safe_erb/tree/master

My local copy is modified to avoid some false positives, and isn't ready
for production use yet.  But here's the first batch of changes it
recommended.  Note that some of these changes weren't really necessary--
some of the values we're wrapping can't actually contain HTML
metacharacters, at least not in normal locales.

Also note that SafeERB is only useful for the normal view code in places
like /admin, and that it won't help us with Liquid plugins in the front
end.  But it's a start.</message>
  <tree>bf75a57264c39abb41b433917bea009351be6b48</tree>
  <committer>
    <name>Eric Kidd</name>
    <login>emk</login>
    <email>git@randomhacks.net</email>
  </committer>
</commit>
