Thanks for spotting this! Instead of sanitizing the URL itself, we can leverage an existent method. `FormatUrlForSecurityDisplay` omitting the scheme should do the trick
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
Thanks for spotting this! Instead of sanitizing the URL itself, we can leverage an existent method. `FormatUrlForSecurityDisplay` omitting the scheme should do the trick
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
- file:// URLs: strip fragment via GetWithoutRef(), strip query
string via std::string::find('?'), then strip trailing dots via
find_last_not_of('.')update this to last implementation
base::TrimString(current_site, u". ", ¤t_site);Add a comment that explains why this is needed.
} else if (url.SchemeIs(url::kDataScheme)) {
current_site = u"data:";
} else {I think it's ok to show the full data url. Page info shows the data url (see [screenshot](https://drive.google.com/file/d/1BM4HPLF6_MOTetcCAS8M2SCfx4Gr8GLL/view?usp=drive_link))
Changing that would be a different conversation. I think for this CL we can just address the url for file.
extensions::ui_util::GetFormattedHostForDisplay(*web_contents);Could we use `url_formatter::FormatUrlForSecurityDisplay` for all cases? so not differentiating scheme is file?
And, make this change on chrome/browser/extensions/extension_ui_util.cc so we fix this bug for all cases :)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
- file:// URLs: strip fragment via GetWithoutRef(), strip query
string via std::string::find('?'), then strip trailing dots via
find_last_not_of('.')update this to last implementation
done
Add a comment that explains why this is needed.
done
} else if (url.SchemeIs(url::kDataScheme)) {
current_site = u"data:";
} else {I think it's ok to show the full data url. Page info shows the data url (see [screenshot](https://drive.google.com/file/d/1BM4HPLF6_MOTetcCAS8M2SCfx4Gr8GLL/view?usp=drive_link))
Changing that would be a different conversation. I think for this CL we can just address the url for file.
done
extensions::ui_util::GetFormattedHostForDisplay(*web_contents);Could we use `url_formatter::FormatUrlForSecurityDisplay` for all cases? so not differentiating scheme is file?
And, make this change on chrome/browser/extensions/extension_ui_util.cc so we fix this bug for all cases :)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |