Changeset 3912:326f9c53acae
- Timestamp:
- 11/03/18 09:32:26 (7 years ago)
- Branch:
- default
- Location:
- inc
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.page.php
r3903 r3912 166 166 ' <meta name="viewport" content="width=device-width, initial-scale=1.0" />' . "\n" . 167 167 ' <title>' . $title . ' - ' . html::escapeHTML($core->blog->name) . ' - ' . html::escapeHTML(DC_VENDOR_NAME) . ' - ' . DC_VERSION . '</title>' . "\n"; 168 169 echo self::jsUtil(); 168 170 169 171 if ($core->auth->user_prefs->interface->darkmode) { … … 454 456 ' <meta name="GOOGLEBOT" content="NOSNIPPET" />' . "\n"; 455 457 458 echo self::jsUtil(); 459 456 460 if ($core->auth->user_prefs->interface->darkmode) { 457 461 echo self::jsVars(['dotclear_darkMode' => 1]); … … 740 744 741 745 return $ret; 746 } 747 748 public static function jsUtil() 749 { 750 return self::jsLoad($core->blog->getPF('util.js')); 742 751 } 743 752 -
inc/core/class.dc.utils.php
r3874 r3912 133 133 { 134 134 return dcUtils::jsVars([$n => $v]); 135 } 136 137 public static function jsJson($id, $vars) 138 { 139 // Use dcUtils::jsLoad($core->blog->getPF('util.js')) to use the JS getData() decoder 140 $ret = '<script type="application/json" id="' . html::escapeHTML($id) . '-data">' . "\n" . 141 json_encode($vars, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES) . "\n" . '</script>'; 142 return $ret; 135 143 } 136 144
Note: See TracChangeset
for help on using the changeset viewer.