function decode(text) {
    try {
        return decodeURIComponent('' + text);
    }
    catch (err) { }
    return '' + text;
}
Decode text using `decodeURIComponent`. Returns the original text if it
fails.

@param text - string to decode
@returns decoded string