mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-24 12:53:31 +01:00
Fix charset validation.
This commit is contained in:
@@ -238,7 +238,13 @@ var IO = Module("io", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
validateCharset: function validateCharset(charset) {
|
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
|
// TODO: there seems to be no way, short of a new component, to change
|
||||||
|
|||||||
Reference in New Issue
Block a user