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

[WebExtension port] URI class, DomainUtils, PSL #894

Open
9 of 24 tasks
myrdd opened this issue Apr 4, 2018 · 0 comments
Open
9 of 24 tasks

[WebExtension port] URI class, DomainUtils, PSL #894

myrdd opened this issue Apr 4, 2018 · 0 comments

Comments

@myrdd
Copy link
Member

myrdd commented Apr 4, 2018

task list

  • change the *Request class constructors
  • use … only in the xpcom build
  • remove unused functions
    • RequestService.getContentPolicyType (?)
  • nsIURI -> Uri class
    • preparations
      • No longer differentiate between "host === null" and "host === undefined" [A.2]
      • "Request": take a string, not a nsIUri object
    • get replacement for nsIURI WIP
    • nsIURI → Uri class
  • hostname services
    • nsIEffectiveTLDService → node package psl WIP
    • nsIIDNService.convertToDisplayIDN() -> rp.services.idn [A.1]
  • … (?)

details

A.1

  • convertToDisplayIDN() is the only nsIIDNService function used
  • it's used by…
    • DomainUtils.getBaseDomain()
    • OldRules class
  • the ASCII <-> UTF-8 conversion will be done by node package punycode
  • the decision whether punycode or IDN (ascii or unicode) is to be displayed for a specific domain (or domain label) depends on an eTLD check: «If a TLD is in the whitelist, we unconditionally display Unicode.» [1]

A.2

  • Three possibilities:
    • "normal-host.com"
    • "" (empty host, e.g. "file:///")
    • null/undefined (e.g. "about:config")

links

[1] https://wiki.mozilla.org/IDN_Display_Algorithm

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

No branches or pull requests

1 participant