Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#19440 closed defect (bug) (invalid)

JavaScript errors in l10n.js

Reported by: szotsaki Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: Validation Keywords:
Focuses: Cc:


In the minified wp-includes/js/l10n.js there are some JavaScript errors, which prevent to work correctly with plugins like W3 Total Cache.

I marked the missing semicolons with XXX in the code (5 in total):

function convertEntities(b) {
	var d, a;
	d = function(c) {
		if(/&[^;]+;/.test(c)) {
			var f = document.createElement("div");
			f.innerHTML = c;
			return !f.firstChild ? c : f.firstChild.nodeValue XXX
		return c XXX
	if( typeof b === "string") {
		return d(b) XXX
	} else {
		if( typeof b === "object") {
			for(a in b) {
				if( typeof b[a] === "string") {
					b[a] = d(b[a]) XXX
	return b XXX

Change History (1)

#1 @nacin
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Those semicolons are allowed to be omitted as } terminates the line. What are the JavaScript errors?

You can enable define('SCRIPT_DEBUG', true); to load the development script which, of course, would include those semicolons.

3.3 handles localized strings for JS differently, making convertEntities() and l10n.js no longer needed. So closing as invalid on this count as well as the aforementioned.

Note: See TracTickets for help on using tickets.