Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In HTML to MFM, use angle bracket if needed #6817

Merged
merged 1 commit into from
Nov 7, 2020
Merged

Conversation

mei23
Copy link
Contributor

@mei23 mei23 commented Nov 7, 2020

Summary

Fix #6815
HTMLからMFMに変換する際、
hrefとtextとが同じでhrefがエンコードされていない場合に、
ベタテキストのURLに変換してしまっていたものを<URL>を使用するように。

以下の前方一致用のパターンを全体のバリデーションに使っちゃってたから実はバグ
https://github.com/syuilo/misskey/blob/9d405b45812438841be6496ec4622264ca886a4c/src/mfm/prelude.ts#L39

before

<a href="https://example.com/ä">https://example.com/ä</a>
↓
https://example.com/ä

after

<a href="https://example.com/ä">https://example.com/ä</a>
↓
<https://example.com/ä>

@mei23 mei23 requested a review from syuilo November 7, 2020 14:07
@syuilo syuilo merged commit 27d0ac3 into develop Nov 7, 2020
@syuilo syuilo deleted the mei-v12-html-to-mfm branch November 7, 2020 15:38
@syuilo
Copy link
Member

syuilo commented Nov 7, 2020

アザス!
テストも助かります🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Umlauts in URL break URL convert to link
2 participants