@@ -165,6 +165,7 | |||||
165 | # class RedCloth::Textile.new( str ) |
|
165 | # class RedCloth::Textile.new( str ) | |
166 |
|
166 | |||
167 | class RedCloth3 < String |
|
167 | class RedCloth3 < String | |
|
168 | include Redmine::Helpers::URL | |||
168 |
|
169 | |||
169 | VERSION = '3.0.4' |
|
170 | VERSION = '3.0.4' | |
170 | DEFAULT_RULES = [:textile, :markdown] |
|
171 | DEFAULT_RULES = [:textile, :markdown] | |
@@ -960,6 +961,8 class RedCloth3 < String | |||||
960 | href, alt_title = check_refs( href ) if href |
|
961 | href, alt_title = check_refs( href ) if href | |
961 | url, url_title = check_refs( url ) |
|
962 | url, url_title = check_refs( url ) | |
962 |
|
963 | |||
|
964 | return m unless uri_with_safe_scheme?(url) | |||
|
965 | ||||
963 | out = '' |
|
966 | out = '' | |
964 | out << "<a#{ shelve( " href=\"#{ href }\"" ) }>" if href |
|
967 | out << "<a#{ shelve( " href=\"#{ href }\"" ) }>" if href | |
965 | out << "<img#{ shelve( atts ) } />" |
|
968 | out << "<img#{ shelve( atts ) } />" |
@@ -43,6 +43,12 module Redmine | |||||
43 | "<pre>" + CGI.escapeHTML(code) + "</pre>" |
|
43 | "<pre>" + CGI.escapeHTML(code) + "</pre>" | |
44 | end |
|
44 | end | |
45 | end |
|
45 | end | |
|
46 | ||||
|
47 | def image(link, title, alt_text) | |||
|
48 | return unless uri_with_safe_scheme?(link) | |||
|
49 | ||||
|
50 | tag('img', :src => link, :alt => alt_text || "", :title => title) | |||
|
51 | end | |||
46 | end |
|
52 | end | |
47 |
|
53 | |||
48 | class Formatter |
|
54 | class Formatter |
General Comments 0
You need to be logged in to leave comments.
Login now