incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1043107 - /incubator/deltacloud/trunk/server/views/images/index.xml.haml
Date Tue, 07 Dec 2010 15:52:44 GMT
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)
 



Mime
View raw message