Test page_name, not text

Fix from Jason Blevins.
This commit is contained in:
Jacques Distler 2009-06-12 19:47:56 -05:00
parent c98d44606a
commit 9b857d3501
3 changed files with 3 additions and 3 deletions

View file

@ -127,7 +127,7 @@ class StubUrlGenerator < AbstractUrlGenerator
def page_link(mode, name, text, web_address, known_page)
link = CGI.escape(name)
return %{<span class='wikilink-error'><b>Illegal link (contains a '.'):</b> [[#{text}]]</span>} if text.include?('.')
return %{<span class='wikilink-error'><b>Illegal link (target contains a '.'):</b> #{name}</span>} if name.include?('.')
case mode
when :export
if known_page then %{<a class="existingWikiWord" href="#{link}.html">#{text}</a>}