Open Bug 1861645 Opened 1 year ago Updated 1 year ago

Replace KeywordUtils use of nsIScriptableUnicodeConverter with Services.textToSubURI.ConvertAndEscape

Categories

(Firefox :: Address Bar, task, P3)

task

Tracking

()

People

(Reporter: standard8, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sng][search-tech-debt])

KeywordUtils is currently using nsIScriptableUnicodeConverter in a convert and escape style routine:

https://searchfox.org/mozilla-central/rev/c51359e1e6beeb6cee5eafe67272c9be16fcf5c1/toolkit/modules/KeywordUtils.sys.mjs#66-79

We should be able to replace that section with Services.textToSubURI.ConvertAndEscape.

We may need to be careful to ensure the regexp replacement (/[+@\/]+/g) still works correctly as well.

It is possible we'll need to create some tests for this - or at least find if they exist in the urlbar tests (which is the only place that currently uses it).

You need to log in before you can comment on or make changes to this bug.