Chrome Release Bot (LUCI) 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
..
android 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
spoof_checks 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
tools 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
BUILD.gn 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
DEPS 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
DIR_METADATA 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
OWNERS 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
README.md 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
elide_url.cc 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
elide_url.h 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
elide_url_unittest.cc 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
url_fixer.cc 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
url_fixer.h 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
url_fixer_unittest.cc 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
url_formatter.cc 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
url_formatter.h 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
url_formatter_android.cc 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
url_formatter_unittest.cc 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago

README.md

The URL Formatter component contains utilities to convert between URLs and human-entered/human-readable strings. Broadly, consuming human-entered URLs happens via «fixup», which tries to make «reasonable» adjustments to strings to convert them into URLs (e.g. auto-prepending schemes, but also many more, some of which may be surprising). Producing human-readable URLs happens via «formatting», which can strip unimportant parts of the URL, unescape/decode sections, etc.

These functions are meant to work in conjunction with the stricter, more limited capabilities of GURL, and were originally designed for use with the omnibox, though they’ve since been used in other parts of the UI as well.

Because these functions are powerful, it’s possible to introduce security risks with incautious use. Be sure you understand what you need and what they’re doing before using them; don’t just copy existing callers.