format(input): convert to string before concat The checked character for `<input type="checkbox">` was concatenated to the '[' and ']' characters before converting it to string, which resulted in an expression like '[' + 'X' + ']', which results in an arithmetic sum between the integer values of the three characters, leading to an unexpected result. . To fix this, simply wrap the checked ternary expression with a braced string constructor.