This is still output in the source code when there’s no custom JS in there. Perhaps there could be a check to see if something is entered and only then output it?
Hi There,
Those texts were commented out with the //
characters.
So you don’t have to worry.
Regards!
Hey @thai, I know but wouldn’t it make more sense to only output the script if there’s actually something in there?
Thanks for pointing this out. We previously ran it through a minifier, which effectively stripped the comments. That minifier was removed because it was causing a false positive with the PHP 7 compatibility checker, and we also felt it would be better to not modify custom javascript added by users. I’ve added this to our bug tracker so we can avoid the unneeded comments being output.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
@JvP quick update on this. The next update will do two things:
- Scripts are never output if they only contain comments. When scripts are output, the comments are not stripped away.
- The placeholder text is no longer stored as part of the code. It looks like the code until you start typing, then it goes away.