Extendy / SmartyURL

SmartyURL is a PHP-based web application for Smart URL management, Sharing, shortening, and analytics, featuring smart redirects.
https://docs.smartyurl.extendy.net/
MIT License
12 stars 2 forks source link

smartyurl.minifyHtmloutput = true makes js error #68

Closed ghost closed 1 year ago

ghost commented 1 year ago

When enable minify Html output using

smartyurl.minifyHtmloutput = true

will cause a javascript error in many js files newurl

The error:

Uncaught SyntaxError: Unexpected end of input

if we check the file we can see all js code is on one line and commited like this

image

mshannaq commented 1 year ago

I need to reevaluate the method SmartyURL employs for minifying HTML output. The current approach used for HTML minification in SmartyURL is discussed in detail on Stack Overflow at link.

mshannaq commented 1 year ago

The problem that i see is coming from the comment line // in javascript code

we must make sure from javascript codes rendered from codeigniter has no comment line // and use / comments / instead

or disable minifying html output by setting smartyurl.minifyHtmloutput to false in .env file.