MyBB Community Forums

Full Version: using the $ or $ in theme
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
There is a template that I have that needs to display the $ symbol.
However if I put $ into the template it warns me of a security risk.

If I then use the ascii replacement $ it saves this fine, however changes the template to the actual symbol so next time I save I get the warning again.

Does anyone have a valid workaround for this?

Dan
Add it to language variable, load the variable instead.
Well, I don't know if you already make use of FontAwesome or not, but 3.2.0 just came out and includes a dollar sign. You can use <i class="icon-usd"></i>.

http://fortawesome.github.io/Font-Awesome/icons/
Including a whole font just for a dollar sign is stupid though. The MyBB template "security" check is really long past a looking at.
"I don't know if you already make use of FontAwesome or not"

Toungue
That'll teach me to skim read Wink I saw "FontAwesome... 3.2.0... includes dollar sign..."
It doesn't complain for me for a lone $ sign.

It may complain for $var but then you can just use <span>$</span>var (or: <!-- -->$<!-- -->var) and it will show up (literally) as $var

In theory, it should be \$ but MyBB somehow manages to turn that into a literal \$ so it turns it into \\\$ internally or something. Haven't checked.
hmm on my 1.6.10 it I tried everything
Ascii, escaping with \ and just putting it in there

In the end I put it into the plugin code as part of the string. I need to start pulling all the text out into a language file anyway which is my goal for next week

Thanks for all the advice and options guys, really appreciate it
oops, nvm
$ (ASCII) is what you can use and when next time on saving, you enter it again (as read from OP).
Pages: 1 2