Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

.im is not considered a TLD #59

Open
metajack opened this issue Sep 19, 2017 · 4 comments
Open

.im is not considered a TLD #59

metajack opened this issue Sep 19, 2017 · 4 comments

Comments

@metajack
Copy link

Typing "metajack.im" into the url bar takes me to duckduckgo instead of to the url. I'm guessing the TLD detection needs a bit of expansion.

@paulrouget
Copy link
Owner

relevant code:

if request.ends_with(".com") || request.ends_with(".org") || request.ends_with(".net") {

@paulrouget
Copy link
Owner

We should use servo::net_traits::is_pub_domain.

@tschneidereit
Copy link
Collaborator

We should use servo::net_traits::is_pub_domain.

I agree - trying to properly handle TLDs in the embedding is a losing game - they're just too complex and require large-ish tables and such.

@paulrouget
Copy link
Owner

I'm confused, is_pub_domain seems to allow more that what resources/pub_domain.txt is listing.

bors-servo pushed a commit to servo/servo that referenced this issue Mar 4, 2018
Prompt URL on Cmd/Ctrl-L

<!-- Please describe your changes on the following line: -->

The `sanitize_url` code is very naive. I'm sure we can do better.
This ServoShell issue describes the problem: paulrouget/servoshell#59

I can fix that now if someone can help me figure out how to tell if a string is a valid url which is just missing a scheme. Or we can do that in a follow up.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20165

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20182)
<!-- Reviewable:end -->
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Mar 6, 2018
…l); r=jdm

<!-- Please describe your changes on the following line: -->

The `sanitize_url` code is very naive. I'm sure we can do better.
This ServoShell issue describes the problem: paulrouget/servoshell#59

I can fix that now if someone can help me figure out how to tell if a string is a valid url which is just missing a scheme. Or we can do that in a follow up.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20165

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: ec3aa8bd7a985b26f894a73f9b84fc53a005d453

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7c313a0358fb1b5923cad0221afdfae11ba11b03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants