[Pkg-mozext-commits] [adblock-plus] 230/464: Work around bug 726994: Don't use entities in install.rdf, spell out everything instead

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:20 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 8ee084370b5b88c8f3aeacb71051b773d85f4371
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Wed Apr 4 13:24:11 2012 +0200

    Work around bug 726994: Don't use entities in install.rdf, spell out everything instead
---
 install.rdf.tmpl | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/install.rdf.tmpl b/install.rdf.tmpl
index b336972..138940a 100644
--- a/install.rdf.tmpl
+++ b/install.rdf.tmpl
@@ -4,21 +4,19 @@
    - version 2.0 (the "License"). You can obtain a copy of the License at
    - http://mozilla.org/MPL/2.0/. -->
 
-<!DOCTYPE RDF [
-  <!ENTITY meta "
-    <em:creator>{{metadata.get('general', 'author')}}</em:creator>
+{%- macro meta() -%}
+<em:creator>{{metadata.get('general', 'author')}}</em:creator>
 
-    {%- if metadata.has_section('contributors') %}
-    {%- for option in metadata.options('contributors')|sort %}
-    <em:contributor>{{metadata.get('contributors', option)}}</em:contributor>
-    {%- endfor %}
-    {%- endif %}
+{%- if metadata.has_section('contributors') -%}
+{%- for option in metadata.options('contributors')|sort -%}
+<em:contributor>{{metadata.get('contributors', option)}}</em:contributor>
+{%- endfor -%}
+{%- endif -%}
 
-    {%- for translator in localeMetadata|translators %}
-    <em:translator>{{translator}}</em:translator>
-    {%- endfor %}
-  ">
-]>
+{%- for translator in localeMetadata|translators -%}
+<em:translator>{{translator}}</em:translator>
+{%- endfor -%}
+{%- endmacro %}
 
 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
@@ -28,7 +26,7 @@
     <em:version>{{version}}</em:version>
     <em:name>{{localeMetadata[defaultLocale].name}}</em:name>
     <em:description>{{localeMetadata[defaultLocale].description}}</em:description>
-    &meta;
+    {{ meta() }}
     {%- if metadata.has_option('homepage', 'default') %}
     <em:homepageURL>{{metadata.get('homepage', 'default')}}</em:homepageURL>
     {%- endif %}
@@ -65,7 +63,7 @@
     <em:localized>
       <Description>
         <em:locale>{{localeCode}}</em:locale>
-        &meta;
+        {{ meta() }}
         <em:name>
           {%- if 'name' in locale -%}
             {{locale.name}}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list