Auto merge of #5903 - psdh:textencoder5900, r=Ms2ger

... #5900

Fixes #5900

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5903)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-05-01 16:33:58 -05:00
commit ba8eaac3e4
2 changed files with 1 additions and 220 deletions

View file

@ -14,7 +14,6 @@ use dom::bindings::utils::{Reflector, reflect_dom_object};
use util::str::DOMString;
use std::borrow::ToOwned;
use std::ascii::AsciiExt;
use std::ptr;
use encoding::types::EncodingRef;
@ -50,7 +49,7 @@ impl TextEncoder {
// https://encoding.spec.whatwg.org/#dom-textencoder
pub fn Constructor(global: GlobalRef,
label: DOMString) -> Fallible<Temporary<TextEncoder>> {
let encoding = match encoding_from_whatwg_label(&label.trim().to_ascii_lowercase()) {
let encoding = match encoding_from_whatwg_label(&label) {
Some(enc) => enc,
None => {
debug!("Encoding Label Not Supported");