Make WordPress Core

Opened 10 years ago

Closed 8 years ago

#38646 closed defect (bug) (reported-upstream)

wp-embed.min.js contains extra code

Reported by: szepe.viktor Owned by:
Priority: normal Milestone:
Component: Embeds Version: 4.5
Severity: trivial Keywords: close
Cc: Focuses:

Description

a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}else;}

"else" is not in wp-embed.js!

Could it be an Uglify2JS issue?
​https://github.com/aaronjorbin/develop.wordpress/blob/master/Gruntfile.js#L444-L456

Change History (5)

#1 @szepe.viktor
10 years ago

Props markoheijnen

#2 @dd32
10 years ago

This isn't a regression in the uglify process in 4.7, although does seem like extra code at first glance.

The else; has been there since ​https://build.trac.wordpress.org/changeset/35672/trunk/wp-includes/js/wp-embed.min.js which seems to stem from the conditionals: false in r35708 which is required to avoid the && issue in #34698.

#3 @swissspidy
10 years ago

  • Keywords close added
  • Severity normal → trivial
  • Version 4.6.1 → 4.5

This should indeed be reported upstream as it's specific to the conditionals: false setting in UglifyJS2. I get the same errant else in their online demo. Perhaps there's even a valid reason for it that we just don't know about.

#5 @swissspidy
8 years ago

  • Milestone Awaiting Review
  • Resolution → reported-upstream
  • Status new → closed

This has been fixed upstream in early 2017: ​https://github.com/mishoo/UglifyJS2/pull/1449

Note: See TracTickets for help on using tickets.