This module checks the format of hooks used in and .
This module can be used from templates or from other Lua modules.
From templates, call the isValidHook
function, and use the parameter to specify the hook.
{}
Valid hooks will return a value of "yes"; invalid hooks will return the empty string.
You can also use the first positional parameter to specify the hook. If you do this, it is recommended to use explicitly; if not, and the hook contains an equals sign, the text before the equals sign will be treated as a parameter name and the hook will not be recognised.
From modules, call the _isValidHook
function with the hook as the first positional parameter.
Valid hooks will return true
; invalid hooks will return false
.