Board Thread:Support Requests - Getting Technical/@comment-301511-20160514193709/@comment-1757994-20160514201832

It is possible to expand MediaWiki templates in JavaScript.

Presumably the template in question is w:c:eastenders:Template:CatchupCode4.

If that string follows any sort of pattern, it is probably also possible in JavaScript alone (and therefore more likely to get approved by review). I looked at the history of that template. A definitive pattern didn't seem obvious. If it really needs to be something you edit by hand, I have two suggestions. Since the code appears to be just lower-case alphanumeric, just use a regex to validate that.
 * 1) Read (or render) the template, but do some input validation before inserting it into the url.
 * 2) Use a "Custom" MediaWiki: message (which have been whitelisted) to limit editing to admins, then also do input validation.