Jump to content

Theme color variable bug


Numbered

Recommended Posts

Posted

Hello friends.

I create a custom tab with a color setting. Filled it. If i use it in theme CSS as background: {theme="my_var"}; - all is fine, it compiled to background: #1D3746;

But if I using background: {hextorgb="my_var" opacity="0.6"}; than it compiled in css to: background: htmlspecialchars( 'my_var', ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );

e93ec68173c69c4559800a1a0073355c.png.03cbb0f91253af1b61e8b5f3259218a3.png

This issue worked only for custom variables. Default theme vars worked well. Maybe I forget doing something?

Thanks

Posted

I found the place, which doing this wrong stuff:

\system\Theme\Theme.php, line 4563:

else
{
    $replace = "\nCONTENT;\n\$return .= htmlspecialchars( \$" . $var[1] . ", ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n\$return .= <<<CONTENT\n";
}

If I modify them to something like that it starts working right:

else
{
    $rep1 = htmlspecialchars( $var[1], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );
    $replace = "\nCONTENT;\n\$return .= $rep1\n\$return .= <<<CONTENT\n";
}

The result:

67ea96810d6ffa4cb7c4b6131f5b88cc.png.2893df0af0f47962aeef1dc5806cce8c.png

So. IPS, fix it please :cool:

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...