mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-16 23:32:30 +02:00
Fix charset validation.
This commit is contained in:
1 parent
1c2766371b
commit
a9a97704f3
1 file changed
+7
-1
@@ -238,7 +238,13 @@ var IO = Module("io", {
|
||||
},
|
||||
|
||||
validateCharset: function validateCharset(charset) {
|
||||
new TextDecoder(charset);
|
||||
try {
|
||||
new TextDecoder(charset);
|
||||
return true;
|
||||
}
|
||||
catch (e) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
// TODO: there seems to be no way, short of a new component, to change
|
||||
|
||||
Reference in new issue
Block a user