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:
parent
a072f9d7c3
commit
c98d44606a
4 changed files with 22 additions and 4 deletions
|
@ -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>}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue