https://bugzilla.wikimedia.org/show_bug.cgi?id=30042
--- Comment #23 from f.trott <[email protected]> 2011-11-16 09:32:09 UTC --- (In reply to comment #20) > Proposed patch does not affect textareas. Right. Sorry, did not read the code correctly. > Perfectly valid? What do you mean? Balanced braces so Mediawiki parser will > interpret them as template/magic word/parser function invocation? We already > talked about it. Yes, that's what I mean. And yes, we already talked about it. But no, there was no agreed way to go forward. > Forms must not accept invalid input. But they must accept valid input. Especially if it was accepted before. > I implemented a simple patch, so user will be warned about invalid characters. The user will not only be warned, they will be denied the usage of these characters. > Yes, users can not use templates, magic words and other stuff in form fields. > But do you really think all this stuff is actually required in forms? Yes. > If somebody wants to use templates, it means this person is aware about > template > syntax, and, therefore, can relatively easily edit pages directly. That's exactly what I am saying: This patch implements something for the sake of the majority and in it's course reduces functionality for a minority. And there would even be a solution that does not involve rewriting the MW parser in JS: Introduce a parameter in input definitions that needs to be set to turn this validation ON and is OFF by default. You even proposed something similar yourself, it could look like this: {{{field|Name|input type=text|validate=on}}} It would be even better if you implemented it in a way that other validators could be plugged in, e.g. {{{field|Name|input type=text|validate=nobraces}}} Somebody else could then contribute other validators, e.g. "telephone", "email" Or you could implement a new input type that only accepts simple text, e.g. {{{field|Name|input type=simple text}}} Or you could parse the input text and ensure that braces are balanced, no need to completely recreate the MW parser. Or you could actually send the values to the wiki for validation as Dan proposed. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
