]> git.sesse.net Git - mlt/commitdiff
Add HTML escaping to metadata publishing script.
authorDan Dennedy <dan@dennedy.org>
Wed, 7 Aug 2013 04:27:54 +0000 (21:27 -0700)
committerDan Dennedy <dan@dennedy.org>
Wed, 7 Aug 2013 04:27:54 +0000 (21:27 -0700)
src/swig/ruby/metadata.rb

index 596bcce65272dc16974147cc9bfff29943c0ec4f..87b4d8faccdf6d05525f9162aa400fe499dbd88e 100755 (executable)
@@ -27,7 +27,7 @@ media types:
 %   end
 %%BR%
 % end
-description: <%= yml['description'] %> %BR%
+description: <%= ERB::Util.h(yml['description']) %> %BR%
 version: <%= yml['version'] %> %BR%
 creator: <%= yml['creator'] %> %BR%
 % yml['contributor'] and yml['contributor'].each do |x|
@@ -39,7 +39,7 @@ contributor: <%= x %> %BR%
 % if yml['notes']
 ---++ Notes
 %   yml['notes'].each do |x|
-<%= x %>
+<%= ERB::Util.h(x) %>
 %   end
 % end
 
@@ -55,7 +55,7 @@ contributor: <%= x %> %BR%
 %   yml['parameters'].each do |param|
 ---+++ <%= param['identifier'] %>
 <%= "title: #{param['title']} %BR%\n" if param['title'] %>
-<%= "description: #{param['description']} %BR%\n" if param['description'] %>
+<%= "description: #{ERB::Util.h(param['description'])} %BR%\n" if param['description'] %>
 type: <%= param['type'] %> %BR%
 readonly: <%= param['readonly'] or 'no' %> %BR%
 required: <%= param['required'] or 'no' %> %BR%