aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/xml_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/xml_format.rb')
-rw-r--r--lib/sisu/v6/xml_format.rb20
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/sisu/v6/xml_format.rb b/lib/sisu/v6/xml_format.rb
index 38cc7f85..e649fa51 100644
--- a/lib/sisu/v6/xml_format.rb
+++ b/lib/sisu/v6/xml_format.rb
@@ -191,15 +191,26 @@ module SiSU_XML_Format
end
if defined? @md.rights.all \
and @md.rights.all=~/\S+/ # DublinCore 15 - rights
- @rdf_rights=%{ dc.rights="#{@md.rights.all}"\n}
- @rights=%{<meta name="dc.rights" content="#{@md.rights.all}" />\n}
+ rights=meta_content_clean(@md.rights.all)
+ copyright=meta_content_clean(@md.rights.copyright.all)
+ @rdf_rights=%{ dc.rights="#{rights}"\n}
+ @rights=%{<meta name="dc.rights" content="#{rights}" />\n}
end
- @copyright=%{<meta name="copyright" content="#{@md.rights.copyright.all}" />\n} if @md.rights.copyright.all # possibly redundant see dc.rights
+ @copyright=%{<meta name="copyright" content="#{copyright}" />\n} \
+ if @md.rights.copyright.all # possibly redundant see dc.rights
@owner=%{<meta name="owner" content="#{@md.owner}" />\n} if @md.owner
@keywords=%{<meta name="keywords" content="#{@md.keywords}" />\n} if @md.keywords
@vz=SiSU_Viz::Defaults.new #margin,paragraph,table,banner,url,png,txt,color,font,nav_txt,nav_png,credits,js,php
@index='index'
end
+ def meta_content_clean(content='')
+ content=if not content.nil?
+ content=content.tr('"',"'").
+ gsub(/&/,'&amp;')
+ content=SiSU_XML_Munge::Trans.new(@md).char_enc.utf8(content)
+ else content
+ end
+ end
def table_close
'</font> </td></tr></table>'
end
@@ -558,7 +569,8 @@ WOK
def prefix_a
end
def rights
- rights=@md.rights.copyright.all.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>&copy;</sup>&nbsp;')
+ copyright=meta_content_clean(@md.rights.copyright.all)
+ rights=copyright(/^\s*Copyright\s+\(C\)/,'Copyright <sup>&copy;</sup>&nbsp;')
%{<p class="small_left">Rights: #{rights}</p>
<p />}
end