# Document.createTextNode("\\u{feff}") in quote-button.js.es6 breaks the latest Opera Browser

**URL:** <https://meta.discourse.org/t/document-createtextnode-u-feff-in-quote-button-js-es6-breaks-the-latest-opera-browser/31563>\
**Category:** Bug\
**Created:** [2015年七月30日 15:37 UTC](https://meta.discourse.org/t/document-createtextnode-u-feff-in-quote-button-js-es6-breaks-the-latest-opera-browser/31563 "2015-07-30T15:37:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmitry\_fedyuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dmitry_fedyuk/32/293153_2.png) [@dmitry\_fedyuk](https://meta.discourse.org/u/dmitry_fedyuk)\
**Post date:** [2015年七月30日 15:37 UTC](https://meta.discourse.org/t/document-createtextnode-u-feff-in-quote-button-js-es6-breaks-the-latest-opera-browser/31563/1 "2015-07-30T15:37:20Z")

</div>

The message in Developer Console:

> Uncaught SyntaxError: Unexpected token ILLEGAL

Opera 30.0.1835.125

> <https://github.com/discourse/discourse/blob/v1.4.0.beta6/app/assets/javascripts/discourse/controllers/quote-button.js.es6#L53>

---

<div class="post-metadata">

**Author:** ![dmitry\_fedyuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dmitry_fedyuk/32/293153_2.png) [@dmitry\_fedyuk](https://meta.discourse.org/u/dmitry_fedyuk)\
**Post date:** [2015年七月30日 16:03 UTC](https://meta.discourse.org/t/document-createtextnode-u-feff-in-quote-button-js-es6-breaks-the-latest-opera-browser/31563/2 "2015-07-30T16:03:19Z")

</div>

I have quick fixed it for myself by replacing from `"\u{feff}"` to `""`.

---

<div class="post-metadata">

**Author:** ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)\
**Post date:** [2015年七月30日 19:20 UTC](https://meta.discourse.org/t/document-createtextnode-u-feff-in-quote-button-js-es6-breaks-the-latest-opera-browser/31563/3 "2015-07-30T19:20:26Z")

</div>

I tried on the latest Opera on OSX and could not reproduce the bug. However the error seems to be that it doesn’t understand the ES6 unicode format, which we should be transpiling. I added it as an option to babel:

[https://github.com/discourse/discourse/commit/3c742918fe581f0752d1cfd3d0995923a908674b](https://github.com/discourse/discourse/commit/3c742918fe581f0752d1cfd3d0995923a908674b)

Could you upgrade to our latest and try again? It should be transpiled properly now.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2015年七月31日 21:10 UTC](https://meta.discourse.org/t/document-createtextnode-u-feff-in-quote-button-js-es6-breaks-the-latest-opera-browser/31563/4 "2015-07-31T21:10:19Z")

</div>

This topic was automatically closed after 24 hours. New replies are no longer allowed.
