parser/pageparser: Don't allow parameters after closing tag in shortcodes

Problem:
Previously, the following self-closing shortcode syntax was incorrectly allowed:
{{% sc / param %}}

Solution:
Only allow parameters before the self-closing tag
This commit is contained in:
Guilherme Soares
2025-01-23 17:43:38 +00:00
committed by Bjørn Erik Pedersen
parent bb7b3d3cdb
commit c939c33fd3
2 changed files with 4 additions and 0 deletions

View File

@@ -322,6 +322,7 @@ func lexInsideShortcode(l *pageLexer) stateFunc {
}
l.closingState++
l.isInline = false
l.elementStepNum = 0
l.emit(tScClose)
case r == '\\':
l.ignore()