mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 10:04:11 +01:00
Fix charset validation.
This commit is contained in:
@@ -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