diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-03-10 08:43:44 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-03-10 08:43:57 -0500 |
commit | 755acef8c7673081e9fb946d789d394afaee68ee (patch) | |
tree | 961e24d40e555b1ab5b0472f8e06029fd3a563eb /lib/sisu/v3/html_tune.rb | |
parent | v2, v3: texpdf, url (regex) pattern match fix (diff) |
v2, v3: dal_syntax + downstream output, email regex revised
* revised pattern match for email address, (removes occasional interference
with urls having embedded email addresses) (dal_syntax and affected
downstream output modules)
Diffstat (limited to 'lib/sisu/v3/html_tune.rb')
-rw-r--r-- | lib/sisu/v3/html_tune.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/sisu/v3/html_tune.rb b/lib/sisu/v3/html_tune.rb index 18b4576b..5bbcdf6c 100644 --- a/lib/sisu/v3/html_tune.rb +++ b/lib/sisu/v3/html_tune.rb @@ -319,11 +319,8 @@ module SiSU_HTML_Tune dob.obj.gsub!(/!new/,%{ <img border="0" height="15" width="15" src="#{@env.url.images}/#{@vz.icon_new}" alt="new">}) dob.obj.gsub!(/<:h(.{1,7}?)>/,'<a href="#h\1">\1</a>') dob.obj.gsub!(/<:to(\d{1,7}?)>/,'<a href="#to\1">to { \1 }</a> ') - if dob.obj =~/\b\S+\@\S+?\.\S+/ \ - and dob.obj !~/(\"\S+\@\S+?\.\S+\"|>\S+\@\S+?\.\S+?<)/ - dob.obj.gsub!(/([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)/,'<<a href="mailto:\1">\1</a>>') - end dob.obj.gsub!(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'<a href="\1" target="_top">\1</a>') #http ftp matches escaped, no decoration + dob.obj.gsub!(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/,%{#{@brace_url.xml_open}<a href="mailto:\\1">\\1</a>#{@brace_url.xml_close}}) dob.obj.gsub!(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,%{#{@brace_url.xml_open}<a href="\\1" target="_top">\\1</a>#{@brace_url.xml_close}}) #http ftp matches with decoration if dob.obj =~/#{Xx[:html_relative2]}\/\S+/ \ and dob.obj !~/(\"#{Xx[:html_relative2]}\/\S+?\"|>\s*#{Xx[:html_relative2]}\/\S+<)/ |