# YouTube-Titel mit einzelnen Hochkomma führen dazu, dass der Thementitel abgeschnitten wird

**URL:** <https://meta.discourse.org/t/youtube-titles-with-single-quote-s-causes-topic-title-to-get-cut-off/90370>\
**Category:** Bug\
**Created:** [21. Juni 2018 um 05:02 UTC](https://meta.discourse.org/t/youtube-titles-with-single-quote-s-causes-topic-title-to-get-cut-off/90370 "2018-06-21T05:02:12Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![cmwebdev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmwebdev/32/122368_2.png) [@cmwebdev](https://meta.discourse.org/u/cmwebdev)\
**Post date:** [21. Juni 2018 um 05:02 UTC](https://meta.discourse.org/t/youtube-titles-with-single-quote-s-causes-topic-title-to-get-cut-off/90370/1 "2018-06-21T05:02:12Z")

</div>

**To reproduce:**

1. Paste YouTube link with title containing single quote in new topic title field  
**Example link:** `https://www.youtube.com/watch?v=L6EbORDmpNY`  
**YouTube Title:** Colin Wolfe & ‘The Chronic’

2. Fetched title cuts off at the first appearance of single quote.  
**Discourse Title:** Colin Wolfe &

In the source of that YouTube page, the title that Discourse is retrieving looks like this:

```js
document.title = "Colin Wolfe \u0026 'The Chronic' - YouTube";

```

I’m guessing that the quote throws it off somewhere in here:

> <https://github.com/discourse/discourse/blob/beta/lib/retrieve_title.rb#L18-L33>

---

_[View the full topic](https://meta.discourse.org/t/youtube-titles-with-single-quote-s-causes-topic-title-to-get-cut-off/90370)._
