WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 14 months ago

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

wp-embed.min.js contains extra code

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

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
3 years ago

Props markoheijnen

#2 @dd32
3 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
3 years ago

  • Keywords close added
  • Severity changed from normal to trivial
  • Version changed from 4.6.1 to 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
14 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.