Sylvestre Ledru
265e672179
Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
...
# ignore-this-changeset
--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Valentin Gosu
66d5164c37
Bug 1502097 - (Part 2) Define IDN blocklist as ranges of characters [ {firstChar, lastChar}* ] r=jfkthame,dragana
...
* Changes the format of the blocklist from a list of characters to a list of
character ranges. Binary search still works, and it is easier to include
large ranges of characters in the blocklist.
* Moves logic for handling the blocklist to IDNBlocklistUtils.h/.cpp
* Changes NS_EscapeURL to take a function that determines if a character
is blocked. This way the type of the array doesn't matter.
Differential Revision: https://phabricator.services.mozilla.com/D12210
--HG--
extra : moz-landing-system : lando
2018-11-24 12:04:34 +00:00
Henri Sivonen
074a8bb5ea
Bug 1460233 - Percent-encode ampersand and colon when replacing unmappable code points in URL query state. r=valentin
...
Spec change: https://github.com/whatwg/url/pull/386
MozReview-Commit-ID: Fa84kCNghtU
Differential Revision: https://phabricator.services.mozilla.com/D8728
--HG--
extra : moz-landing-system : lando
2018-10-16 12:04:12 +00:00
Valentin Gosu
4cade1b2b5
Bug 1389251 - Add esc_Spaces that may be used to force escaping of spaces r=bz,jdescottes
...
MozReview-Commit-ID: 4tahH3IOKW
--HG--
extra : rebase_source : 12057b98c87d7d3c57e90888082f540c49c5a9a9
2018-06-18 15:06:25 +02:00
Dorel Luca
ba31c8c2b2
Backed out 3 changesets (bug 1389251) for browser-chrome failure on browser/base/content/test/pageinfo/browser_pageinfo_image_info.js. CLOSED TREE
...
Backed out changeset a76a3251a9d2 (bug 1389251)
Backed out changeset c6baebf7b34c (bug 1389251)
Backed out changeset 6e89a11ae28e (bug 1389251)
2018-06-15 06:18:04 +03:00
Valentin Gosu
316f7bf9ac
Bug 1389251 - Add esc_Spaces that may be used to force escaping of spaces r=bz,jdescottes
...
MozReview-Commit-ID: 7VgNlkWqrPK
--HG--
extra : rebase_source : c7ea99bc727a82e652871e78c222e8d5d642a52e
2018-06-12 03:05:03 +02:00
Eric Rahm
465336e99f
Bug 1333899 - Part 1: Add a fallible NS_UnescapeURL. r=froydnj
...
This adds a fallible version of |NS_UnescapeURL| that can be used to
gracefully handle allocation failures when the string needs to be unescaped.
--HG--
extra : rebase_source : 8d10ca98fb372afe8219d744b147703254e02830
2018-02-02 10:42:42 -08:00
Nicholas Nethercote
4e54a99900
Bug 1385172 - Move some comments in nsEscape.h. r=erahm.
...
Comments about functions should go before the declaration, not after!
--HG--
extra : rebase_source : 7cfdb2cc7fd926bec36673d8ca334920c07d0a43
2017-08-21 08:58:28 +10:00
Nicholas Nethercote
4a623e6df4
Bug 1385172 - Replace nsEscapeHTML{,2}() with new nsAppendEscapedHTML() function. r=erahm.
...
The existing functions work with C strings but almost all the call sites use
Mozilla strings.
The replacement function has the following properties.
- It works with Mozilla strings, which makes it much simpler and also improves
the call sites.
- It appends to the destination string because that's what a lot of the call
sites need. For those that don't, we can just append to an empty string.
- It is declared outside the |extern "C"| section because there is no need for
it to be in that section.
Note: there is no 16-bit variant of nsAppendEscapedHTML(). This is because
there are only two places that need 16-bit variants, both rarely executed,
and so converting to and from 8-bit is good enough.
The patch also adds some testing of the new function, renaming
TestEscapeURL.cpp as TestEscape.cpp in the process, because that file is now
testing other kinds of escaping.
--HG--
rename : xpcom/tests/gtest/TestEscapeURL.cpp => xpcom/tests/gtest/TestEscape.cpp
extra : rebase_source : 51145ae2c9b0b4573c7ea0c342dcb246f9f14fb9
2017-08-18 12:00:59 +10:00
Valentin Gosu
97a44a506c
Bug 1369317 - Filter and escape URI string in only one pass r=mcmanus
...
MozReview-Commit-ID: KU4C4cS3jZC
--HG--
extra : rebase_source : 4995b4d8a133b8568af5b130be2077ee90f8b4e4
2017-08-13 10:03:34 +02:00
Nicholas Nethercote
f1364a75ea
Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
...
All the instances are converted as follows.
- nsSubstring --> nsAString
- nsCSubstring --> nsACString
--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Nicholas Nethercote
fe9268c4cd
Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
...
All the instances are converted as follows.
- nsAFlatString --> nsString
- nsAFlatCString --> nsCString
--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Eric Rahm
878eac623e
Bug 1249352 - Part 4: Add a fallible NS_EscapeURL. r=froydnj
2016-06-27 11:10:46 -07:00
Andrea Marchesini
98894192c9
Bug 1272781 - nsEscape should work with ns(C)Strings and not with char pointers, r=smaug
2016-05-18 18:21:56 +02:00
Andrea Marchesini
6f820b5dd7
Bug 1272298 - nsFormSubmission should support "\0" input string, r=smaug
2016-05-13 22:48:03 +02:00
Mats Palmgren
93a86d1a91
Bug 1101625 part 1 - Don't escape all non-ASCII characters when unsafe characters are found, just escape the unsafe characters. r=smontagu
2014-12-01 15:55:15 +00:00
Mats Palmgren
e7f3e5289f
Bug 415491, part 2 - Implement a char16_t version of NS_EscapeURL. r=bzbarsky
2014-11-08 02:42:04 +00:00
Birunthan Mohanathas
488f6b602e
Bug 995730 - Fix style violations in xpcom/io/. r=froydnj
2014-05-14 23:15:46 +03:00
Birunthan Mohanathas
51bcf8d525
Bug 995730 - Change xpcom/io/ to use 2 space indentation
...
This also removes trailing whitespace in reindented files.
2014-05-05 20:30:43 +03:00
Ehsan Akhgari
1b83407ce9
Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
...
This patch was automatically generated by the following script:
#!/bin/bash
# Command to convert PRUnichar to char16_t
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*modules/libmar*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name prtypes.h \
! -name Char16.h \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.c" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Ehsan Akhgari
29efae9c22
Bug 928040 - Remove some prtypes.h inclusions from xpcom/; r=bsmedberg
...
--HG--
extra : rebase_source : 2f238320ba8330a27aa986af1146446dcb5d7128
2013-10-18 20:34:57 -04:00
Abhishek Potnis
ad50b9e765
Bug 795511: Removed usages of PR_BIT and PR_BITMASK from the tree; r=ehsan
2012-10-20 07:31:43 +05:30
Ehsan Akhgari
e368dc9c85
Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
...
This patch was generated by a script. Here's the source of the script for
future reference:
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.h \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.c" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t
convert PRIntn int
convert PRUintn unsigned
convert PRSize size_t
convert PROffset32 int32_t
convert PROffset64 int64_t
convert PRPtrdiff ptrdiff_t
convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Gervase Markham
82ff7027aa
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Ehsan Akhgari
92064e6d3f
Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
...
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Michael Wu
d2b70213ac
Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
...
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Felix Fung
0bc71ca85d
Bug 577266 - Correct misspellings in source code
2011-09-06 17:20:35 -07:00
Matheus Kerschbaum
8a4cb927fd
Bug 678155 - Remove NS_COM. r=bsmedberg
2011-08-18 15:46:39 +02:00
Benjamin Smedberg
f0fdeb2ef7
Remove the v1 string ABI compatibility hacks. Replace references of nsTAString_CharT with nsTSubstring_CharT which is the new base class. r=dbaron
2008-09-19 11:07:22 -04:00
cbiesinger@gmx.at
63b56fc006
add unit test for bug 372050 and the unescape parts of bug 350932; also, clarify comments for the ESCAPE_URL_ONLY_NONASCII flag. r+sr+a=bz
2007-08-31 13:19:37 -07:00
asqueella@gmail.com
de27b937fa
Bug 350932 - expose NS_EscapeURL through nsINetUtil
...
p=Prasad Sunkari <prasad@medhas.org>
r+sr=biesi
2007-06-21 13:18:25 -07:00
benjamin%smedbergs.us
cb2a755465
Bug 332147 - Expose nsEscape on a scriptable interface, r=darin
2006-05-02 16:27:23 +00:00
brettw%gmail.com
cf305a077d
Bug 316869, r+sr=darin
...
Convenience function: nsEscape with CString
2005-11-17 19:28:05 +00:00
darin%meer.net
51cb6a3b78
fixes bug 315786 "Make the functions defined in nsEscape.h more useful" r=biesi
2005-11-15 21:41:57 +00:00
timeless%mozdev.org
2c85cc0bd1
Bug 292908 r:/mozilla\intl\uconv\src\nsTextToSubURI.cpp(231) : warning C4309: 'argument' : truncation of constant value
...
r=dougt sr=darin a=shaver
2005-06-01 18:34:53 +00:00
jshin%mailaps.org
2866a93ec9
bug 193439 : use RFC 2231 style encoding for filename parameter (rather than RFC 2047 style encoding) r=bienvenu, sr=darin
2005-03-01 12:37:02 +00:00
cbiesinger%web.de
13366b51ba
bug 244911 nsEscape should document the meaning of the nsEscapeMask enum values
...
r+sr=darin
2004-06-01 19:55:01 +00:00
gerv%gerv.net
31625ba2b1
Bug 236613: change to MPL/LGPL/GPL tri-license.
2004-04-18 14:21:17 +00:00
darin%meer.net
c380c59f65
landing dbaron's patch for bug 235735 "fix callers that cast away const on result of ns[C]String::get" r+sr=darin
2004-02-28 22:34:07 +00:00
jshin%mailaps.org
026e966b62
bug 228176 : in the previous checkin, missed the reviewer comment about the name change (exclude -> skip)
2004-01-07 04:17:40 +00:00
jshin%mailaps.org
8ea11801c8
bug 228176 exclude control characters from unescaping URLs for the UI : r=darin, sr=jst
2004-01-07 03:57:20 +00:00
dougt%netscape.com
0d2808c511
Create a new xpcom obsolete library (and component library).
...
Moved nsFileSpec and related classes into this obsolete library.
Moved nsRegistry and related libreg functionality into the obsolete library.
Updated many callers using the obsolete nsFile spec to use nsIFile and Necko to do file IO.
Combined the following DLLs (source -> dest)
uriloader -> docshell
shistory -> docshell
jsurl -> jsdom
gkview -> gklayout
Moved nsAdapterEnumerator out of xpcom/ds and into mailnews, since they're the only consumer
Modifed the xpt_link tool so that you can specify a �only include� cid list that can mask CID�s that you are not interested in.
Added build options:
Prevent the building of xpinstall (--disable-xpinstall)
Prevent the building js component loader (--disable-jsloader)
A build option to only build a single profile (--enable-single-profile)
A build flag to only built the required xpfe components (--disable-xpfe-components).
Removal or hiding of unused functions and classes including nsEscape*, nsDequeIterator, nsRecyclingAllocatorImpl, nsDiscriminatedUnion, nsOpaqueKey, nsCRT::strlen, NS_NewCommandLineService
Bug 194240, r/sr = darin, alec.
2003-03-15 01:04:32 +00:00
andreas.otte%debitel.net
0f9fa9ad78
fix bug 193477 [URL: colon ":" in URI is escaped in request (not scheme or port delimiter)] no longer escape the colon when it is part of the filename in urls, but force it's escape in links when building dir/index listings, r=bbaetz@acm.org, sr=darin@netscape.com
2003-02-27 13:15:19 +00:00
andreas.otte%debitel.net
6f076f634b
fix bug 191638 [index/html: files|dirs with "%" need to be properly encoded] force escape of % as part of filenames to %25 to not be damaged by unescape, r=bbaetz@acm.org, sr=darin@netscape.com
2003-02-27 10:55:01 +00:00
darin%netscape.com
f1a6738b6c
fixes bug 124042 "support internationalized URIs" r=dougt, sr=alecf, a=asa
2002-03-06 07:48:55 +00:00
darin%netscape.com
3de33f888b
cleaning up some comments
2002-01-12 01:19:45 +00:00
darin%netscape.com
e4ecaec549
fixes first part of bug 109179 "replace NS_EscapeURL with NS_EscapeURLPart"
...
r=andreas.otte@debitel.net
sr=alecf@netscape.com
2002-01-11 23:02:22 +00:00
darin%netscape.com
36a44ba4ac
landing standard url rewrite (bug 103916)
...
r=andreas.otte@debitel.net , sr=brendan,alecf
2001-11-16 02:09:13 +00:00
gerv%gerv.net
4e12e44b2f
Relicensing Round 1, Take 2. Most C-like NPL files -> NPL/GPL/LGPL. Bug 98089.
2001-09-28 20:14:13 +00:00
dougt%netscape.com
758f79ff72
Landing url parsing branch. 73845. r=alecf@netscape.com, sr=darin@netscape.com, a=blizzard@rednat.com.
...
This fixes many crashes caused by illegal uses of the nsStdURL.
This also allows a plugable protocol to provide their own url parser.
2001-06-21 22:02:47 +00:00