# 이메일에서 Vimeo 임베드 URL이 잘못 분석됩니다

**URL:** https://meta.discourse.org/t/vimeo-embed-urls-parsed-incorrectly-in-email/231042
**Category:** Bug
**Created:** [6월 24, 2022, 5:56오후 UTC](https://meta.discourse.org/t/vimeo-embed-urls-parsed-incorrectly-in-email/231042 "2022-06-24T17:56:20Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![ghassan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ghassan/32/263566_2.png) [@ghassan](https://meta.discourse.org/u/ghassan)
#### Post date: [6월 29, 2022, 11:47오전 UTC](https://meta.discourse.org/t/vimeo-embed-urls-parsed-incorrectly-in-email/231042/6 "2022-06-29T11:47:49Z")

</div>

iframe를 가져오기 위해 다음을 수행했습니다:

`GET` `https://vimeo.com/api/oembed.json?url=https://vimeo.com/508864124/fcbbcc92fa`  
그 결과 다음을 얻었습니다.

```json
{"type":"video","version":"1.0","provider_name":"Vimeo","provider_url":"https:\/\/vimeo.com\/","html":"<iframe src=\"https:\/\/player.vimeo.com\/video\/508864124?h=fcbbcc92fa&amp;app_id=122963\" width=\"426\" height=\"240\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture\" allowfullscreen><\/iframe>","width":426,"height":240,"domain_status_code":403,"video_id":508864124,"uri":"\/videos\/508864124:fcbbcc92fa"}

```

iframe의 UTF-8 디코딩 결과:

```plaintext
<iframe src="https://player.vimeo.com/video/508864124?h=fcbbcc92fa&amp;app_id=122963" width="426" height="240" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>

```

iframe 자체

https://player.vimeo.com/video/508864124?h=fcbbcc92fa&app_id=122963

수정/업데이트:

수정을 위해 PR을 제출했습니다. 표준 유형이 아닐 때 Vimeo를 올바르게 캡처하지 못했던 것이 정규식 패턴 문제였던 것 같습니다. 따라서 정규식 패턴을 그에 맞게 변경했습니다.

> <https://github.com/discourse/discourse/pull/17277>
>
> Vimeo has two url structure:
> 
> \- Normal /video\_id
> 
> \- Private/Unlisted /video\_id/h…ash\_string
> 
> This changes change the regex pattern thus it would be able to
> 
> catch both. Also it tolerate trailing slash.
> 
> This shall fixes:
> 
> https://meta.discourse.org/t/vimeo-embed-urls-parsed-incorrectly-in-email/231042

---

_[View the full topic](https://meta.discourse.org/t/vimeo-embed-urls-parsed-incorrectly-in-email/231042)._
