diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-02-05 01:09:02 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-02-05 01:09:02 -0500 |
commit | d79d6050ce31f7d8d65a87be4008e11fae368770 (patch) | |
tree | 7599c14156ab2e5a79e9d87117e2d2ff7835da61 /lib/sisu/v5/html_format.rb | |
parent | v5 v6: epub, hash digests used only if available (diff) |
v5 v6: html, (output) cleaning
Diffstat (limited to 'lib/sisu/v5/html_format.rb')
-rw-r--r-- | lib/sisu/v5/html_format.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/sisu/v5/html_format.rb b/lib/sisu/v5/html_format.rb index a933d091..e244bbb8 100644 --- a/lib/sisu/v5/html_format.rb +++ b/lib/sisu/v5/html_format.rb @@ -502,7 +502,8 @@ WOK end def rights def all - rights=@md.rights.all.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ') + rights=SiSU_HTML_Tune::CleanHTML.new(@md.rights.all).clean_for_html + rights=rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ') %{<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+"> <sup>\d+<\/sup> /m,'') + gsub(/<a[\s]+name="-\d+"[\s]+href="#_\d+"> <sup>\d+<\/sup> /m,'') end %{<#{tag} class="#{attrib}"> <a href="##{@ocn_html_identifier}#{@ocn}"><i>#{txt}</i></a> #{note} |