aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/html_format.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-02-05 01:09:02 -0500
committerRalph Amissah <ralph@amissah.com>2014-02-05 01:09:02 -0500
commitd79d6050ce31f7d8d65a87be4008e11fae368770 (patch)
tree7599c14156ab2e5a79e9d87117e2d2ff7835da61 /lib/sisu/v6/html_format.rb
parentv5 v6: epub, hash digests used only if available (diff)
v5 v6: html, (output) cleaning
Diffstat (limited to 'lib/sisu/v6/html_format.rb')
-rw-r--r--lib/sisu/v6/html_format.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/sisu/v6/html_format.rb b/lib/sisu/v6/html_format.rb
index 63271d95..de5a7144 100644
--- a/lib/sisu/v6/html_format.rb
+++ b/lib/sisu/v6/html_format.rb
@@ -502,7 +502,8 @@ WOK
end
def rights
def all
- rights=@md.rights.all.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>&copy;</sup>&nbsp;')
+ rights=SiSU_HTML_Tune::CleanHTML.new(@md.rights.all).clean_for_html
+ rights=rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>&copy;</sup>&nbsp;')
%{<p class="small_left">Rights: #{rights}</p>
<p />}
end
@@ -977,7 +978,9 @@ WOK
end
def para_form_css(tag,attrib) # regular paragraphs shaped here
ul=ulc=''
- ul,ulc="<ul>\n ","\n </ul>" if @tag =~/li/
+ if tag =~/li/
+ ul,ulc="<ul>\n ","\n </ul>"
+ end
%{
<div class="substance">
#{@p_num.ocn_display}
@@ -1250,7 +1253,7 @@ WOK
note=$1
note=note.gsub(/[\s]+/m,' ')
txt=txt.gsub(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ').
- gsub(/<a[\n\s]+name="-\d+"[\n\s]+href="#_\d+">&nbsp;<sup>\d+<\/sup>&nbsp;/m,'')
+ gsub(/<a[\s]+name="-\d+"[\s]+href="#_\d+">&nbsp;<sup>\d+<\/sup>&nbsp;/m,'')
end
%{<#{tag} class="#{attrib}">
<a href="##{@ocn_html_identifier}#{@ocn}"><i>#{txt}</i></a> #{note}