aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/odf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/odf.rb')
-rw-r--r--lib/sisu/v2/odf.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sisu/v2/odf.rb b/lib/sisu/v2/odf.rb
index 24f45f50..a7c77639 100644
--- a/lib/sisu/v2/odf.rb
+++ b/lib/sisu/v2/odf.rb
@@ -238,7 +238,7 @@ module SiSU_ODF
url.gsub!(/(\\\+)/,'+') #this is convoluted, and risky :-(
map_nametags=SiSU_Particulars::Combined_singleton.instance.get_map_nametags(@md).nametags_map
t=case url
- when /^http:/
+ when /^https?:/
%{<text:a xlink:type="simple" xlink:href="#{url}">#{txt.strip}</text:a>#{trail}}
when /^:/ # site same document collection html link
url.gsub!(/^:/,"#{@env.url.root}/")
@@ -294,7 +294,7 @@ module SiSU_ODF
dob.obj.gsub!(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,
%{#{@brace_url.xml_open}<text:a xlink:type="simple" xlink:href="\\1">\\1</text:a>#{@brace_url.xml_close}}) #http ftp matches with decoration
dob.obj.gsub!(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/,
- %{#{@brace_url.xml_open}<text:a xlink:type="simple" xlink:href="mailto:\\1">\\1</text:a>#{@brace_url.xml_close}}) if dob.obj !~/http:\/\// # improve upon, document crash where url contains '@' symbol
+ %{#{@brace_url.xml_open}<text:a xlink:type="simple" xlink:href="mailto:\\1">\\1</text:a>#{@brace_url.xml_close}}) if dob.obj !~/https?:\/\// # improve upon, document crash where url contains '@' symbol
dob.obj= if dob.is=='para' and dob.indent.to_s =~/[0-9]/ # and t_o.bullet_==true
%{<text:p text:style-name="P1#{dob.indent}">#{dob.obj}</text:p>}
else %{<text:p text:style-name="P1">#{dob.obj}</text:p>}
@@ -369,7 +369,7 @@ module SiSU_ODF
dob.obj.gsub!(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,
%{#{@brace_url.xml_open}<text:a xlink:type="simple" xlink:href="\\1">\\1</text:a>#{@brace_url.xml_close}}) #http ftp matches with decoration
dob.obj.gsub!(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/,
- %{#{@brace_url.xml_open}<text:a xlink:type="simple" xlink:href="mailto:\\1">\\1</text:a>#{@brace_url.xml_close}}) if dob.obj !~/http:\/\// # improve upon, document crash where url contains '@' symbol
+ %{#{@brace_url.xml_open}<text:a xlink:type="simple" xlink:href="mailto:\\1">\\1</text:a>#{@brace_url.xml_close}}) if dob.obj !~/https?:\/\// # improve upon, document crash where url contains '@' symbol
dob.obj.split(/#{Mx[:br_line]}|#{Mx[:br_nl]}/).each do |parablock|
parablock=group_clean(parablock)
parablock.gsub!(/&lt;text:a xlink:type="simple" xlink:href="(.+?)"&gt;/m,'<text:a xlink:type="simple" xlink:href="\1">')