Wikilinks with '." in the Page Name

Rails won't let you put "." in the page name.
This prevents creating new-page Wikilinks with
such names.
This commit is contained in:
Jacques Distler 2009-06-11 13:16:10 -05:00
parent a072f9d7c3
commit c98d44606a
4 changed files with 22 additions and 4 deletions

View file

@ -127,6 +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?('.')
case mode
when :export
if known_page then %{<a class="existingWikiWord" href="#{link}.html">#{text}</a>}