mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FIX: Force string conversions to UTF-8 "bytes" (#11315)
https://meta.discourse.org/t/cant-create-poll-with-some-chinese-options/170836
This commit is contained in:
@ -403,10 +403,9 @@ function ii(a, b, c, d, x, s, t) {
|
||||
}
|
||||
|
||||
function md51(s) {
|
||||
// Converts the string to UTF-8 "bytes" when necessary
|
||||
if (/[\x80-\xFF]/.test(s)) {
|
||||
s = unescape(encodeURI(s));
|
||||
}
|
||||
// Converts the string to UTF-8 "bytes"
|
||||
s = unescape(encodeURI(s));
|
||||
|
||||
var n = s.length,
|
||||
state = [1732584193, -271733879, -1732584194, 271733878],
|
||||
i;
|
||||
|
Reference in New Issue
Block a user