Thread:Adnoam/@comment-26115937-20170830153100/@comment-25219384-20170902075925

Substitution won't help, as the underlying code is still executed, just the result is separated from the original template.

The problem is that DEFAULTSORT isn't actually a template - it's a magic word. So there's nothing to "strip" from the text. It's either executed or not.

So we either find a way to save/restore the default sort key (couldn't find a way to do this), or make it so that setting the sort key is conditional on something we can control via the Options template.