Skip to content
Browse files

Defined entity converter as a constant

  • Loading branch information...
1 parent c7b3324 commit c6086fff24f59e629a0e28a48c31fa0081797c58 @SebastianZ SebastianZ committed Aug 1, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 extension/content/firebug/lib/string.js
View
9 extension/content/firebug/lib/string.js
@@ -11,9 +11,11 @@ function(FBTrace, Options, Deprecated, Xpcom) {
// ********************************************************************************************* //
// Constants
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cu = Components.utils;
+const Ci = Components.interfaces;
+const Cc = Components.classes;
+const Cu = Components.utils;
+
+const entityConverter = Xpcom.CCSV("@mozilla.org/intl/entityconverter;1", "nsIEntityConverter");
const reNotWhitespace = /[^\s]/;
@@ -189,7 +191,6 @@ function createSimpleEscape(name, direction)
function escapeEntityAsName(char)
{
- var entityConverter = Xpcom.CCSV("@mozilla.org/intl/entityconverter;1", "nsIEntityConverter");
try
{
return entityConverter.ConvertToEntity(char, entityConverter.entityW3C);

3 comments on commit c6086ff

@janodvarko
Firebug Working Group member

This one didn't make it into the release, but I guess it isn't a big problem.
Honza

@SebastianZ
Firebug Working Group member

It's not a big deal. When it's not in this release, it will be in 1.10.2. :-)

Sebastian

@janodvarko
Firebug Working Group member

Good.

Btw. 1.10.1 is already awaiting AMO review! :-)

Honza

Please sign in to comment.
Something went wrong with that request. Please try again.