fix wiki alias direction

This commit is contained in:
albert
2012-01-13 18:02:59 -05:00
parent 8c7b8a9b83
commit 7066a28347

View File

@@ -49,8 +49,8 @@ class DText
def self.parse_aliased_wiki_links(str)
str.gsub(/\[\[([^\|\]]+)\|([^\]]+)\]\]/m) do
text = CGI.unescapeHTML($1).tr("_", " ")
title = CGI.unescapeHTML($2)
text = CGI.unescapeHTML($2).tr("_", " ")
title = CGI.unescapeHTML($1)
%{<a href="/wiki_pages/show_or_new?title=#{u(title)}">#{h(text)}</a>}
end
end