You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2010/12/07 16:52:44 UTC

svn commit: r1043107 - /incubator/deltacloud/trunk/server/views/images/index.xml.haml

Author: mfojtik
Date: Tue Dec  7 15:52:44 2010
New Revision: 1043107

URL: http://svn.apache.org/viewvc?rev=1043107&view=rev
Log:
Added CDATA to image name and image description, to avoid
breaking XML when this fields contains unsupported characters.

Modified:
    incubator/deltacloud/trunk/server/views/images/index.xml.haml

Modified: incubator/deltacloud/trunk/server/views/images/index.xml.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/images/index.xml.haml?rev=1043107&r1=1043106&r2=1043107&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/images/index.xml.haml (original)
+++ incubator/deltacloud/trunk/server/views/images/index.xml.haml Tue Dec  7 15:52:44 2010
@@ -4,5 +4,9 @@
     %image{:href => image_url(image.id), :id => image.id}
       - image.attributes.select{ |attr| attr!=:id }.each do |attribute|
         - haml_tag("#{attribute}".tr('-', '_'), :<) do
-          - haml_concat image.send(attribute)
+          - if [:name, :description].include?(attribute)
+            =cdata do
+              - haml_concat image.send(attribute)
+          - else
+            - haml_concat image.send(attribute)