summaryrefslogtreecommitdiffstats
path: root/net/base/escape.cc
Commit message (Collapse)AuthorAgeFilesLines
* base: Add HexDigitToInt function to string_util.htfarina@chromium.org2010-07-311-14/+2
| | | | | | | | | | | | | Removed duplicated HexToInt functions and converted the callers along the way. BUG=None TEST=trybots and out/Debug/base_unittests --gtest_filter=StringUtilTest.HexDigitToInt Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/2836069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54473 0039d316-1c4b-4281-b951-d872f2087c98
* base: Add IsHexDigit function to string_util.htfarina@chromium.org2010-07-231-9/+3
| | | | | | | | | | | | | | | Removed duplicated IsHex functions and converted the callers along the way. (Note: this was a TODO for jungshik). BUG=None TEST=trybots Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/2870058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53428 0039d316-1c4b-4281-b951-d872f2087c98
* Pull latest googleurl to get it to stop unescaping at signs in paths.brettw@chromium.org2010-04-051-1/+1
| | | | | | | | | | This also fixes the URL displayer to stop unescaping at signs. Otherwise, we'll have the weird situation where if you go to a site with a %40 in it where it cares about the difference between %40 and @, pressing enter in the URL bar will load the "@" variant and the URL won't load. BUG=http:///crbug.com/23933 TEST=included unit test Review URL: http://codereview.chromium.org/1614001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43615 0039d316-1c4b-4281-b951-d872f2087c98
* Adding some more escaping method.jcampan@chromium.org2010-01-211-8/+59
| | | | | | | | | | | This will be used by the translate feature. BUG=None TEST=Run the unit-tests. Review URL: http://codereview.chromium.org/548088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36715 0039d316-1c4b-4281-b951-d872f2087c98
* The search terms are escaped using + or %20 for space depending on whether ↵avayvod@google.com2010-01-151-8/+5
| | | | | | | | | | | | replacement is in query part of the URL or not. Removed duplicate EscapeQueryParamValue functions without |use_plus| argument. BUG=24571 TEST=Verify that space is escaped as stated in description; see bug description for example with search on Wikipedia. Review URL: http://codereview.chromium.org/543077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36398 0039d316-1c4b-4281-b951-d872f2087c98
* Implement "Email Link To Page" menu command.snej@chromium.org2009-12-031-0/+4
| | | | | | | | | | | | | | | | | | | This menu item only exists in the Mac build, but the code is cross-platform so it could be hooked up on other platforms as well, if desired. It works by generating a URL of the form mailto:?subject=Fwd:%20PAGETITLE&body=%0A%0APAGEURL and telling platform_utils to open it. This is my first patch involving command handling; I've tried to follow the way similar menu commands like Print are implemented, but feel free to tell me if there are better ways. I didn't find any place for unit tests for TabContents; if this needs tests, let me know where they should go. BUG=29232 TEST=none Review URL: http://codereview.chromium.org/466019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33746 0039d316-1c4b-4281-b951-d872f2087c98
* Remove std::wstring from most of net/base/escape.h.darin@chromium.org2009-11-301-16/+15
| | | | | | | | | | | | | | | | | | | I left the one API because based on the comment, it should eventually be removed. Updated the callers to use UTF16ToWideHack until more work can be done to remove std::wstring. I also updated net/base/escape_unittest.cc to use the same hack until a proper solution can be coded. Original patch submission here: http://codereview.chromium.org/402085 Patch by Patrick Scott (phanna@android.com) R=darin BUG=23581 TEST=escape_unittest Review URL: http://codereview.chromium.org/452015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33326 0039d316-1c4b-4281-b951-d872f2087c98
* Split *AndAdjustOffset() functions into their own header, to restore ↵pkasting@chromium.org2009-11-131-1/+3
| | | | | | | | | | utf_string_conversions.h to a simple, readable state. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/387012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31928 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up recent string conversion function changes, part 1: Remove ↵pkasting@chromium.org2009-11-101-4/+4
| | | | | | | | | | | | unnecessary code. Thanks to a change in escape.cc I can basically revert the ICU conversions back to what they used to be; I can also get rid of half the conversions immediately since they aren't used. This does not split out the "adjust" versions of the UTF conversions into their own header/implementation; that's coming in the next patch. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/380007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31533 0039d316-1c4b-4281-b951-d872f2087c98
* Fix various problems with inline autocomplete and URLs that change length ↵pkasting@chromium.org2009-11-071-9/+33
| | | | | | | | | | | | | | | | | | | | during fixup: * URLs with http auth info, which gets stripped * URLs with IDN hosts * URLs with escaped values that get unescaped In cases like these, we'd inline autocomplete from the wrong locations, highlight the wrong portions of the URL as matches, and sometimes DCHECK() in debug mode. The fix is to track how fixup affects the offsets into the URL we care about. Plumbing this required an enormous number of additions :( There is also a fix here to the URL Fixer Upper, which was obviously modified at some point in the past to use the Parsed components, but without updating the comments or some of the functionality to match. Since this isn't supposed to "fix up" things that aren't simple typos, I removed some code to "fix" bogus ports, which was causing bizarre effects when typing HTTP auth URLs ("http://foo:bar" would be fixed to "http://foo" and then matched for inline autocompletion, which was clearly wrong). This is tested incidentally by one of the new History URL Provider tests (which is how I discovered it). BUG=4010 TEST=Covered by unittests Review URL: http://codereview.chromium.org/372017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31352 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the dependency on i18n/icu_string_conversions from base/string_util.h.brettw@chromium.org2009-10-101-4/+5
| | | | | | | | | | | | Fix up all files requireing this header to include it directly. Split out the ICU-dependent string util unit tests into a new file base/i18n/icu_string_util_unittest.cc TEST=none BUG=none Review URL: http://codereview.chromium.org/269034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28674 0039d316-1c4b-4281-b951-d872f2087c98
* Rename EscapeUrl and expand the code comment.brg@chromium.com2009-10-011-1/+1
| | | | | | | | BUG=none TEST=Escape.EscapeUrlEncodedData Review URL: http://codereview.chromium.org/257021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27782 0039d316-1c4b-4281-b951-d872f2087c98
* Add EscapeURL to the ASCII escape methods.EscapeURL escapes all forbidden ↵brg@chromium.com2009-10-011-0/+10
| | | | | | | | | | ascii characters in an URL and repalces spaces with '+'. Test=Escape.EscapeUrl BUG=23029 Review URL: http://codereview.chromium.org/244056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27713 0039d316-1c4b-4281-b951-d872f2087c98
* Local text file with spaces in filename is urlencoded in tab titlemhm@chromium.org2009-06-031-0/+4
| | | | | | | | | | | | | | When viewing a local text file with spaces in filename, it is still urlencoded. Filename should be displayed with spaces, not with urlencoding. It would be more user-friendly. Since net::FormatURL is already implemented, using it would be great. But it doesn't escape SPACES, just NORMAL, it doesn't even escape unicode. I plumbed out a unescapeurl that could be used whether we allow conversion of spaces or not. BUG=8775 (http://crbug.com/8775) TEST=Tested whether the input is escaped in the navigational context and ran the net tests New Review: http://codereview.chromium.org/118059 Review URL: http://codereview.chromium.org/56053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17462 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-111-1/+0
| | | | | | | | | Normalize end of file newlines in net/. All files end in a single newline. Review URL: http://codereview.chromium.org/43079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11442 0039d316-1c4b-4281-b951-d872f2087c98
* Fix an out of band read when parsing a URL component of just "%". The ↵deanm@google.com2008-09-031-3/+2
| | | | | | | | calculation of max_digit_index is unsigned, and was underflowing when max was less than 2. BUG=122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1677 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Merge some changes in net/base from branches/mac_july_2008 to trunk.ericroman@google.com2008-08-061-3/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@420 0039d316-1c4b-4281-b951-d872f2087c98
* I looked at the full dump from the previous crashes and it looks like a ↵brettw@google.com2008-07-301-3/+41
| | | | | | testing issue. Hopefully it will be magically unbroken. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting revision 70, 66 and 65 to fix crashes.nsylvain@google.com2008-07-291-41/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71 0039d316-1c4b-4281-b951-d872f2087c98
* Puts back the optional unescaping of control characters and URL ↵brettw@google.com2008-07-291-3/+41
| | | | | | | | | | | | parse-affecting characters. That patch was reverted due to build problems. This is heavily modified from the original patch. That patch required an additional function and a bunch of internal boolean flags. This one uses the new flags enum I wrote to add this to the existing functionality more cleanly. BUG=1271340 BUG=1258819 Review URL: http://chrome-reviews.prom.corp.google.com/804 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66 0039d316-1c4b-4281-b951-d872f2087c98
* Add net to the repository.initial.commit2008-07-261-0/+272
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14 0039d316-1c4b-4281-b951-d872f2087c98