Last modified: 2013-12-24 20:19:51 UTC
Currently, forward slashes within template or form names will make semantic forms behave in an unexpected mannor. I encountered this with the preg_replace code around lines 1430-1460 of SF_FormPrinter.php, but there are many instances of code throughout where the forward slash is used as a delimiter without escaping forward slashes in variables included in the expression. This patch replaces all preg delimiters with the varaible $preg_delim, which has been set to :, a less common character for mediawiki titles & pages, but could easily be changed to anything else if a conflict is found. An alternative to this proposed patch could be to always escape forward slashes in any preg expressions which contain variable data, however that has a potentially high processing cost. This is a simpler solution but not without flaws, it currently assumes the % will not be used within a variable expression - potentially as dangerous as assuming / will not be used, but it does at least introduce a means to quickly change all regular expressions to use a different delimiter.
Created attachment 10212 [details] Patch to replace / delimiter with a variable $preg_delim
Thanks for the patch, Andru.
changing to "new" since this has a patch
I believe this was fixed at some point (by escaping characters - the "slow" way); and I can't reproduce it now. I'm marking this as "fixed".