Skip to content

Commit

Permalink
Added CDATA to image name and image description, to avoid
Browse files Browse the repository at this point in the history
breaking XML when this fields contains unsupported characters.

git-svn-id: https://svn.apache.org/repos/asf/incubator/deltacloud/trunk@1043107 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mfojtik committed Dec 7, 2010
1 parent ee7ec30 commit 795f035
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/views/images/index.xml.haml
Expand Up @@ -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)

0 comments on commit 795f035

Please sign in to comment.