• Welcome to League Of Reason Forums! Please read the rules before posting.
    If you are willing and able please consider making a donation to help with site overheads.
    Donations can be made via here

Your suggestions for implementing sarcasm tags

arg-fallbackName="Vivre"/>
Prolescum said:
Also Vivre, UK/US keyboards use the shift modifier key for those, not strg (which if I understand correctly is the equivalent of ctrl whose modifying behaviour isn't applicable as its function is OS-level). In any case, I'm not sure how that'll affect this. Feel free to educate me :D
Sorry - of course I should have used ctrl ... BUT even so I also mixed it wanting to point at shift :roll:
Because it was these characters I came across first that 'corrupted' the tooltip and thought it might be part of the reason (containing e.g. control characters) why this happens.

I'm stil wondering what these above listed characters have in common. ... or is it due to the character encoding - just thinking aloud.

But what strikes me most is that it's not only that these characters might be omitted in the popup-hint but also in the basic text. I couldn't write this using an apostrophe.
 
arg-fallbackName="Prolescum"/>
Master_Ghost_Knight said:
And if you try to do image, it will get busted!

I don't know how you are doing it, but here is my suggestion:

1. Check if the number of characters inside the tool-tip is bellow a certain number, let's say a 80 character limit. If not, prevent post.
2. Check if the number of new line feeds is below a certain limit, Lest say 8. If not, prevent post. Note. Each line can hold 40 characters.
3. Check if character assortment is between (#32 and #126) or (#192 and #255) or new line (don't know if it is implemented with #10 or #13). If not, remove characters.
4. Covert forbidden characters (#34; #38; #39; #60; #62) into their respective substitution code (" & ' < >)
5. Store that text as the content that goes into the title="" item. Note you should have a special html tag (whit the respective CSS styling code) to indicate that the text inside is supposed to have a tooltip. (I believe you already got that)
ex.
<tip title="ToolTip Text">Stuff that has the tool tip </tip>
6. Start processing the text that shall receive the tip. Use the constructor as usual, with the exception that now there can not be a "[tooltip" before a [/tooltip]. If that happens prevent posting. (no tool tip nesting rule).
7. Increment the tool tip counter, a text should not have more than a certain limit of tooltips. Let's say 20. If not prevent post.
8. Generate the code:
ex. <tip title="ToolTip Text">Stuff that has the tool tip </tip>

Thanks :)

They're stripped of utility via php i.e. all special characters are excluded except commas and full stops (periods). I wanted to know which I should allow.
I'll definitely limit the amount of characters and lines, though. :D
Vivre said:
Sorry - of course I should have used ctrl ... BUT even so I also mixed it wanting to point at shift :roll:
Because it was these characters I came across first that 'corrupted' the tooltip and thought it might be part of the reason (containing e.g. control characters) why this happens.

No need to apologise. I've only ever used a UK keyboard with a US or UK layout, so I learned something. This can never be a bad thing.
I'm stil wondering what these above listed characters have in common. ... or is it due to the character encoding - just thinking aloud.

They're all characters that can be abused. We don't want people adding arbitrary or dangerous code.
But what strikes me most is that it's not only that these characters might be omitted in the popup-hint but also in the basic text. I couldn't write this using an apostrophe.

Whoops!

So the list to add is:
  1. !
  2. ?
  3. '

Anything else?

P.S. I'm off out so I'll disable the tag until I update it.
 
arg-fallbackName="Master_Ghost_Knight"/>
In theory it is possible to allow all characters without unwanted code being injected. When you post plain text, it already does that. It is just a matter of filtering.
I can see situations where people could use these ones:
(
)
-
_
*
+
[
]
{
}
=
<
>
,
;
$

£
%
@
/
Although I maybe pushing it.
 
arg-fallbackName="Prolescum"/>
I'll consider them, but I can't yet see why most of those would be used in a tooltip.
 
Back
Top