If there are quotes, their only purpose is to be able to insert some "]" characters in the label itself. If the enclosing quotes themselves should be present, then it's enough to double the quotes as only one level of quotes is stripped.
At this occasion, `Formatter._unquote` becomes `trac.util.text.label_unquote`.
Suggested by Mitar on trac-dev.