| Index: Source/modules/encoding/TextDecoder.cpp
|
| diff --git a/Source/modules/encoding/TextDecoder.cpp b/Source/modules/encoding/TextDecoder.cpp
|
| index 84df22cad1c6f5b8fa545d123d5e612747d6da51..86ada4928f85aa58970acd69811fa4bdecd87b00 100644
|
| --- a/Source/modules/encoding/TextDecoder.cpp
|
| +++ b/Source/modules/encoding/TextDecoder.cpp
|
| @@ -43,7 +43,7 @@ TextDecoder* TextDecoder::create(const String& label, const Dictionary& options,
|
| const String& encodingLabel = label.isNull() ? String("utf-8") : label;
|
|
|
| WTF::TextEncoding encoding(encodingLabel);
|
| - if (!encoding.isValid()) {
|
| + if (!encoding.isValid() || !strcmp(encoding.name(), "replacement")) {
|
| exceptionState.throwTypeError("The encoding label provided ('" + encodingLabel + "') is invalid.");
|
| return 0;
|
| }
|
|
|