impresspages / ImpressPages

ImpressPages is php framework with admin panel. Build functional website in one hour.
http://www.impresspages.org
Other
501 stars 178 forks source link

Logo Initial font not working in ipInlineManagementFontSelector when name has double quotes #801

Open jeffwsw opened 7 years ago

jeffwsw commented 7 years ago

If you select a font with double quotes in the name for the text logo (Ex. "Comic Sans MS","Comic Sans MS",cursive) and then after confirm and close the popup, open the popup again and the font selected is "Default font" again instead of loading "Comic Sans MS".

I found the the problem is in line 58 of Ip/Internal/InlineManagement/assets/src/jquery.fontselector.js as it ends up comparing 'Comic Sans MS' == '"Comic Sans MS"' which returns false.

The variable initialBaseFont comes loaded sometimes with the quoted font name and sometimes without it, this is caused by the initialization of variable curfont in line 179 of Ip/Internal/InlineManagement/assets/src/inlineManagementLogo.js and then passed to the font selector plugin in line 233