Fix bug #17978.
This commit is contained in:
parent
2a967aebb0
commit
84756f889a
|
@ -94,6 +94,8 @@ class UrlGenerator < AbstractUrlGenerator
|
||||||
end
|
end
|
||||||
|
|
||||||
def pic_link(mode, name, text, web_address, known_pic)
|
def pic_link(mode, name, text, web_address, known_pic)
|
||||||
|
href = @controller.url_for :controller => 'file', :web => web_address, :action => 'file',
|
||||||
|
:id => name
|
||||||
case mode
|
case mode
|
||||||
when :export
|
when :export
|
||||||
if known_pic
|
if known_pic
|
||||||
|
@ -103,13 +105,11 @@ class UrlGenerator < AbstractUrlGenerator
|
||||||
end
|
end
|
||||||
when :publish
|
when :publish
|
||||||
if known_pic
|
if known_pic
|
||||||
%{<img alt="#{text}" src="#{CGI.escape(name)}" />}
|
%{<img alt="#{text}" src="#{href}" />}
|
||||||
else
|
else
|
||||||
%{<span class="newWikiWord">#{text}</span>}
|
%{<span class="newWikiWord">#{text}</span>}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
href = @controller.url_for :controller => 'file', :web => web_address, :action => 'file',
|
|
||||||
:id => name
|
|
||||||
if known_pic
|
if known_pic
|
||||||
%{<img alt="#{text}" src="#{href}" />}
|
%{<img alt="#{text}" src="#{href}" />}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue