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

Numbers become <a href="tel:">links even if <meta name="format-detection" content="telephone=no"> is set on iOS #284

Open
k-s-h-r opened this issue Sep 14, 2023 · 4 comments

Comments

@k-s-h-r
Copy link

k-s-h-r commented Sep 14, 2023

By setting <meta name="format-detection" content="telephone=no">, numbers such as phone numbers become text on iOS.

However, the "telephone=no" setting does not work for text in <budoux>, and numbers such as phone numbers become <a href="tel:">.

Is this an iOS issue or a budoux issue?

Sample:
https://codepen.io/rhsk/full/RwEVLBa

<h2>normal</h2>
<p>090-1234-5678</p>
<p>テキストテキストテキストテキストテキスト 090-1234-5678 テキストテキストテキストテキスト</p>

<h2>budoux</h2>
<p><budoux-ja>090-1234-5678</budoux-ja></p>
<p><budoux-ja>テキストテキストテキストテキストテキスト 090-1234-5678 テキストテキストテキストテキスト</budoux-ja></p>
image
@tushuhei
Copy link
Member

Thanks for your report.
I believe that's because <budoux-ja> outputs the translated HTML to its Shadow DOM, which is isolated from the global document. If that's the case, it will be fixed by applying the change to use Light DOM instead Shadow DOM for BudouX Web Components, which is now tracked at #280

@k-s-h-r
Copy link
Author

k-s-h-r commented Sep 15, 2023

Thank you.

I understand about the style as it's a specification of ShadowDOM.

Regarding <a href=“tel:”>, there's a high possibility that <meta name="format-detection" content="telephone=no”> does not work within DOMParser.

Sample: https://codepen.io/rhsk/full/YzdQdNY

image

@k-s-h-r
Copy link
Author

k-s-h-r commented Sep 24, 2023

@tushuhei
Copy link
Member

tushuhei commented Nov 9, 2023

Thanks for investigating the issue. Yes, it seems like the root causation.
I will keep this issue open for future reference and to track their advances in fixing the issue.
In the meantime, you may want to consider rendering the BudouX results on the server side.

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

No branches or pull requests

2 participants