aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html_tune.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-05-26 15:40:01 -0400
committerRalph Amissah <ralph@amissah.com>2010-05-26 15:40:01 -0400
commitc142eedb1854395c4b31bbb4852ca5e10fbaea70 (patch)
tree05f582c5129f7c82be2ae2b42317a5c68f1f770b /lib/sisu/v2/html_tune.rb
parentdebian/changelog (2.3.5-1) (diff)
parentupdate: changelog, version (2.4.0) (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v2/html_tune.rb')
-rw-r--r--lib/sisu/v2/html_tune.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sisu/v2/html_tune.rb b/lib/sisu/v2/html_tune.rb
index c0efb72e..11b1dbde 100644
--- a/lib/sisu/v2/html_tune.rb
+++ b/lib/sisu/v2/html_tune.rb
@@ -255,6 +255,10 @@ module SiSU_HTML_Tune
http_=true
if word =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/
m,u=/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/.match(word).captures
+ elsif word =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:rel_o]}:\S+?#{Mx[:rel_c]}/
+ #http_=false
+ m,u=/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}:(\S+?)#{Mx[:rel_c]}/.match(word).captures
+ u='../' + u
elsif word =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/
http_=false
m,u=/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}(\S+?)#{Mx[:rel_c]}/.match(word).captures
@@ -326,6 +330,7 @@ module SiSU_HTML_Tune
and dob.obj !~/(\"..\/\S+?\"|>\s*..\/\S+<)/
dob.obj.gsub!(/(\.\.\/\S+)/,'<a href="\1">\1</a>')
end
+ dob.obj.gsub!(/<a href=":/,%{<a href="#{@vz.url_site}/})
dob.obj.gsub!(/<a href="\.\.\//,%{<a href="#{@vz.url_site}/})
else
dob.obj.gsub!(/(^|[^}])_</m,'\1&lt;'); dob.obj.gsub!(/(^|[^}])_>/m,'\1&gt;') #code-block: angle brackets special characters