gecko-dev/toolkit/components
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
..
aboutcache
aboutcheckerboard
aboutmemory Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj 2017-08-04 17:49:22 +09:00
aboutperformance Backed out changeset 6896f93a2327 (bug 1385352) for not making it to m-c before the next violation of its new linting rule merged to autoland 2017-08-10 20:21:19 -07:00
addoncompat Bug 1357517 - Remove Preferences.jsm usage from addoncompat component. r=MattN 2017-07-28 21:22:07 +02:00
alerts Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj 2017-08-04 17:49:22 +09:00
apppicker Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj 2017-08-04 17:49:22 +09:00
asyncshutdown Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +02:00
autocomplete Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm 2017-07-27 02:18:20 +08:00
backgroundhangmonitor Bug 1367406 - Part 3: Expose computed modules through .modules getter, r=froydnj 2017-08-16 11:44:05 -04:00
browser Bug 1374460 - Remove internal code that used to be used for showModalDialog. r=smaug 2017-07-13 17:20:10 -07:00
build Bug 1382099 - Remove MOZ_WIDGET_GONK from toolkit/. r=glandium. 2017-07-19 18:38:48 +10:00
captivedetect Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
cloudstorage Bug 1391486 - Cloud Storage - Handle browser.download.dir unspecified in new profile r=Gijs 2017-08-17 23:05:26 -07:00
commandlines Bug 1388253 - Convert nsTextFormatter:[v]smprintf() use to [v]ssprintf(). r=erahm. 2017-08-09 10:41:14 +10:00
contentprefs Backed out changeset f92c249cae8b (bug 886907) for failing editor/libeditor/tests/test_bug1368544.html on Android 4.3 debug. r=backout 2017-08-15 16:35:07 +02:00
contextualidentity Bug 1354602 - Enabling containers for container addons on startup. r=aswan,mconley,zombie 2017-08-13 16:17:41 +01:00
crashes Bug 1373958 - Don't block shutdown while analyzing crashes; r=ted.mielczarek 2017-08-03 16:41:45 +02:00
crashmonitor Bug 1034599 - Convert remaining Promise.defer() uses to PromiseUtils.defer() or new Promise(), r=mconley. 2017-06-23 11:25:02 +02:00
ctypes Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj 2017-08-04 17:49:22 +09:00
diskspacewatcher Bug 1382099 - Remove MOZ_WIDGET_GONK from toolkit/. r=glandium. 2017-07-19 18:38:48 +10:00
downloads Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron. 2017-08-04 14:40:52 +10:00
extensions Bug 1385172 - Replace nsEscapeHTML{,2}() with new nsAppendEscapedHTML() function. r=erahm. 2017-08-18 12:00:59 +10:00
feeds Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj 2017-08-04 17:49:22 +09:00
filepicker Bug 1375125 - Fix errors caused by mechanical replacement. r=froydnj 2017-08-05 08:21:55 +09:00
filewatcher Bug 1375125 - Remove nsILocalFile. r=froydnj 2017-08-05 09:43:49 +09:00
finalizationwitness Bug 1370608 part 1 - Move newEnumerate hook from ObjectOps to ClassOps. r=evilpie,bz 2017-06-14 10:37:44 +02:00
find Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
gfx Bug 1357517 - Remove Preferences.jsm usage from graphics sanity test. r=mchang 2017-07-31 19:36:32 +02:00
jsdownloads Merge m-c to inbound, a=merge 2017-08-08 15:16:00 -07:00
jsoncpp Backed out changeset 9f03844eb810 (bug 1387569) 2017-08-19 20:22:05 +02:00
lz4 Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +02:00
maintenanceservice Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
mediasniffer
microformats Bug 1374670 - Enabled the ESLint no-tabs rule across mozilla-central r=standard8 2017-07-04 21:30:18 +05:30
mozintl Bug 1379905 - Switch mozIntl, datetimebox and DateTimeFormat to use GetRegionalPrefsLocales. r=jfkthame,smaug 2017-07-14 16:47:23 -07:00
mozprotocol
narrate Bug 1374620 - Enabled the ESLint dot-notation rule across mozilla-central r=standard8 2017-07-25 23:45:41 +05:30
osfile Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
parentalcontrols Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
passwordmgr Bug 1386955 - fix password manager test adapting to new NSS behaviour, r=johannh 2017-08-17 15:57:47 +02:00
payments Backed out changeset 3d10672e7e2b (bug 1382388) for failing touched browser-chrome test browser_show_dialog.js. r=backout 2017-08-12 13:46:32 +02:00
perf
perfmonitoring Backed out changeset 6896f93a2327 (bug 1385352) for not making it to m-c before the next violation of its new linting rule merged to autoland 2017-08-10 20:21:19 -07:00
places Bug 1353217 - importing bookmarks from html doesn't need to reset the bookmarks engine. r=markh 2017-08-11 00:19:01 +00:00
printing Bug 1385820 - Enable the ESLint no-new-wrappers rule across mozilla-central; r=markh,standard8 2017-08-07 23:57:51 +05:30
printingui Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron. 2017-08-04 14:40:52 +10:00
privatebrowsing
processsingleton Backed out 3 changesets (bug 1382968) for breaking browser_addons_debug_webextension.js a=backout 2017-08-08 09:17:56 -07:00
promiseworker Bug 1383120 - Enable no-arbitrary-setTimeout eslint rule on xpcshell tests, r=mossop 2017-07-26 09:08:07 -04:00
prompts Bug 1388238 - Implement waitForMasterPasswordDialog helper which handles open dialogs. r=MattN 2017-08-16 18:45:11 +08:00
protobuf Bug 1373525 - toolkit/protobuf: Suppress warnings in third-party code. r=Mossop 2017-06-12 22:18:42 -07:00
reader Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu 2017-07-29 20:50:21 +09:00
reflect
remote Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
remotebrowserutils Backed out changeset 871476099df7 (bug 1383299) for xpcshell failures a=backout CLOSED TREE 2017-08-18 09:43:36 -07:00
resistfingerprinting Merge m-c to inbound, a=merge 2017-08-11 13:25:37 -07:00
satchel Bug 1385820 - Enable the ESLint no-new-wrappers rule across mozilla-central; r=markh,standard8 2017-08-07 23:57:51 +05:30
search Bug 1374695 - Add extensionID to addEngine API. r=florian 2017-08-14 15:51:12 -05:00
securityreporter
startup Bug 1391359 - Cleanup timestamp computation in nsAppStartup.cpp. r=gsvelto 2017-08-17 11:50:00 -04:00
statusfilter Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug) 2017-07-28 13:11:59 -07:00
telemetry Bug 1390881 - Improve the TFO telemetry. r=mcmanus 2017-08-20 09:45:26 +02:00
terminator bug 1366294 - Part 13 - Fix telemetry-using tests. r=Dexter 2017-07-24 09:52:26 -04:00
thumbnails Bug 1388215: Part 3 - Use JIT-friendly defineLazy*Getters methods when defining many lazy imports. r=florian 2017-08-09 13:03:36 -07:00
timermanager Backed out changeset 5856f1c45a92 (bug 1375077) for Windows opt permaorange in test_worker_basic.html 2017-06-22 20:43:44 -07:00
tooltiptext Bug 1390411 - Disable failing bc tests and enable it for stylo. r=jmaher 2017-08-16 10:02:56 +10:00
typeaheadfind Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm. 2017-08-16 13:58:35 +10:00
url-classifier Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE. 2017-08-18 10:58:47 -04:00
urlformatter Bug 1384509 - Test replacing *_API_KEY variables in URLs using the URL formatter and test trimming sensitive URLs. r=mossop 2017-07-28 10:14:57 +02:00
utils
viewconfig
viewsource Bug 1357517 - Avoid leaking Preferences property in viewsource test. r=MattN 2017-07-28 21:23:12 +02:00
windowcreator Backed out changeset 6896f93a2327 (bug 1385352) for not making it to m-c before the next violation of its new linting rule merged to autoland 2017-08-10 20:21:19 -07:00
windowwatcher Bug 1374460 - Remove internal code that used to be used for showModalDialog. r=smaug 2017-07-13 17:20:10 -07:00
workerloader
xulstore
moz.build Backed out changeset 8df491f3dcdf for landing with the wrong bug number in the commit message. 2017-08-15 19:27:16 -04:00
nsDefaultCLH.js
nsDefaultCLH.manifest