Make WordPress Core

Opened 6 years ago

#43403 new enhancement

Improve wp_add_inline_script()

Reported by: alpipego's profile alpipego Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Script Loader Keywords:
Focuses: Cc:


Just an idea for the moment:

Instead of testing if the js has script tags and adding an error messages but also fixing the problem at the same time, why not accept both. If the passed data has tags just leave them (this would potentially fix #40276) and if not surround the code with plain <script> tags.

Change History (0)

Note: See TracTickets for help on using tickets.