Fxed handling of a page that tries to include itself
This commit is contained in:
parent
66ab8df6f4
commit
9f36bd59a9
|
@ -24,7 +24,7 @@ class Include < WikiChunk::WikiReference
|
|||
def get_unmask_text_avoiding_recursion_loops
|
||||
if refpage then
|
||||
refpage.clear_display_cache
|
||||
if refpage.wiki_includes.include?(@content.page_name)
|
||||
if refpage.name == @content.page_name or refpage.wiki_includes.include?(@content.page_name)
|
||||
# this will break the recursion
|
||||
@content.delete_chunk(self)
|
||||
return "<em>Recursive include detected; #{@page_name} --> #{@content.page_name} " +
|
||||
|
|
Loading…
Reference in a new issue