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
Valentin Gosu
d1cae23d3b
Bug 1426996 - Use fallible assign in NS_EscapeAndFilterURL r=kershaw
...
MozReview-Commit-ID: EKVeQb3cboU
--HG--
extra : rebase_source : f06b3c6f4e8e68a2a56ac39ef4261a669d99adaa
2017-12-26 21:47:22 +01:00
Sylvestre Ledru
b48518e115
Bug 1413103 - nsEscape.cpp: disable the formatting of netCharType & EscapeChars r=erahm
...
MozReview-Commit-ID: GHM6EnO9S5h
--HG--
extra : rebase_source : 932bc33cdc5720f65043f7e3566d36078894c318
2017-10-31 08:36:02 +01:00
Chris Pearce
04945c8950
Bug 1407624 - Make nsEscape.cpp build in non-unified mode. r=froydnj
...
nsEscape.cpp doesn't build in non-unified mode, as it uses mozilla::fallible,
mozilla::CheckedInt and mozilla::ASCIIMask::IsMasked without prefixing them
with the mozilla namespace. I suspect this file is usually included in
unified_cpp file which includes a "using namespace mozilla" directive.
MozReview-Commit-ID: GwlsK8kytLj
--HG--
extra : rebase_source : c3063aff7cdf10c416b8ee782c9bee745e643842
2017-10-11 16:32:23 +02: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
Valentin Gosu
b3e75dbf06
Bug 1386683 - Do not escape the `'` character in the URL hash r=junior
...
MozReview-Commit-ID: DkoDvWGbWfu
--HG--
extra : rebase_source : 22de804e82136114a0688ce271cac8c49f8c4f23
2017-08-06 11:13:04 +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
Simon Lindholm
620a47f1e2
Bug 1287277 - Avoid repeated string reallocations in NS_UnescapeURL. r=nfroyd
...
--HG--
extra : rebase_source : 67490a033fd6ef52d3047c6e194322b223d85b0f
2016-07-14 01:27:23 +02: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
Valentin Gosu
67b179e6f9
Bug 412457 - should unescape hostname first, then perform IDNA r=mcmanus
2015-11-18 15:25:27 +01:00
Valentin Gosu
f4d3791247
Bug 1163030 - URL: stop escaping ` in query r=mcmanus
2015-11-02 13:55:24 +01:00
Valentin Gosu
e96a491a5d
Bug 1163028 - URL: stop escaping [ and ] in path r=mcmanus
2015-11-02 13:54:10 +01:00
Chris Peterson
0dbaae1ce2
Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8
2015-09-07 23:56:16 -07:00
Mike Hommey
924c9eb636
Bug 1134923 - Remove NS_Alloc/NS_Realloc/NS_Free. r=nfroyd
...
They are kept around for the sake of the standalone glue, which is used
for e.g. webapprt, which doesn't have direct access to jemalloc, and thus
still needs a wrapper to go through the xpcom function list and get to
jemalloc from there.
2015-05-01 09:40:30 +09:00
Valentin Gosu
b6ae7d5d90
Bug 1040285 - Single Quotes should not be encoded in the path r=mcmanus,annevk
2015-04-28 18:29:22 +03:00
Mike Hommey
b077d9624d
Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd
2015-04-01 13:51:45 +09:00
Jacek Caban
50943d7672
Bug 1142584 - Fixed nsEscape.cpp compilation on mingw GCC 4.8. r=nfroyd
2015-03-19 14:29:54 +01:00
Valentin Gosu
f561749154
Bug 1121826 - backout cc192030c28f - brackets shouldn't be automatically escaped in the Query r=mcmanus
2015-01-17 16:13:21 +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
Valentin Gosu
04a675301a
Bug 473822 - Square brackets not percent-encoded in URI's query-part. r=jduell
2014-09-06 01:32:04 +03: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
James Kitchener
ee57f16151
Bug 328755 - Assigning a zero-length string should not alloc a buffer. r=bsmedberg
2014-02-03 22:57:56 +10:30
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
4fc038aac3
Bug 941405 - Remove the usages of the register keyword from XPCOM; r=froydnj
2013-11-21 10:42:40 -05:00
Matt Brubeck
3919e75e03
Bug 935376 - Back out 2e6063aa9b77 (bug 328755) on suspicion of causing a crash in ntdll
2013-11-05 21:12:56 -08:00
James Kitchener
04bddc47a6
Bug 328755 - Assigning a zero-length string should not alloc a buffer. r=bsmedberg
2013-11-04 14:22:37 -05:00
Birunthan Mohanathas
0cfca404c5
Bug 784739 - Switch from NULL to nullptr in xpcom/ (2/3); r=ehsan
2013-10-10 16:41:39 -04:00
Makoto Kato
eada8e34f0
Bug 800220 - Part 1. Replace PL_strlen with strlen. r=ehsan
2013-05-08 12:40:12 +09:00
Isaac Aggrey
481e7dfb0b
Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan
2012-09-28 01:57:33 -05:00
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
Aryeh Gregor
d0ad5a7d0c
Bug 777292 part 2 - Change all nsnull to nullptr
2012-07-30 17:20:58 +03:00
Shriram Kunchanapalli
5b9a95ea6a
Bug 743581: Removes nsCRT::strlen(const PRUnichar*). f=sgautherie r=dougt
2012-05-30 18:43:39 +01:00
Gervase Markham
82ff7027aa
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Shriram Kunchanapalli
86b1d55b6f
Bug 150073 - Remove nsCRT:: in nsCRT::strlen(const char *). r=dougt
2012-02-18 19:17:01 +05:30
Ryan VanderMeulen
503ea93a8c
Backout 17deb5f61b4d (bug 150073) due to build bustage. a=shouldausedtryfirst
2012-04-03 20:22:42 -04:00
Shriram Kunchanapalli
dcbb9c3017
Bug 150073 - Remove nsCRT:: in nsCRT::strlen. f=sgautherie, r=dougt
2012-02-18 19:17:01 +05:30
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
Julian Reschke
af0dfc9e86
Bug 665706 - Remove historic special handling for semicolons in URIs. r=rjesup
2011-08-22 16:51:52 +02:00
Matheus Kerschbaum
8a4cb927fd
Bug 678155 - Remove NS_COM. r=bsmedberg
2011-08-18 15:46:39 +02:00
timeless@mozdev.org
9f31b3da5e
Bug 562528 - comparison between signed and unsigned integer expressions in nsEscapeHTML2, r=bsmedberg
...
--HG--
extra : rebase_source : 995cb88bc3bdb692ea154be2ebee597b0f777e58
2010-04-28 17:58:00 -07:00
Daniel Veditz
87eae8b89c
bug 464998 - r+sr=bsmedberg, a=beltzner
2008-11-19 11:55:59 -05:00
Daniel Veditz
3ab8ffe9cb
bug 455987 crash fix, r/sr=bsmedberg
2008-10-24 16:15:33 -07:00
Michal Novotny
70da375aea
Bug 367736 - make nsEscape more efficient and clean up some signed/unsigned issues to prevent theoretical overflow, r=bsmedberg+dveditz
2008-08-19 09:57:12 -04:00