Is there a way to disable text macros from being applied to text? I'm not wanting to use html_encode().
I have a way to do it by looping through text macros in a list and replacing the text macro with nothing, but I don't have a full list of text macro colors such as \red, \blue, etc.
ID:167611
![]() Feb 20 2006, 1:04 pm (Edited on Feb 21 2006, 4:00 pm)
|
|
![]() Feb 21 2006, 3:38 pm
|
|
Bump.
|
Artemio wrote:
but I don't have a full list of text macro colors such as \red, \blue, etc. See the reference. |
Artemio wrote:
The reference doesn't have a full list. Text macros start with '\' (a backslash) and end with a space or other punctuation. \the, \The // insert 'the' (if needed) \a, \an, // insert 'a(n)' or 'some' (if needed) \A, \An \he, \He // insert 'he/she/they/it' \she, \She // same \his, \His // insert 'his/her/their/its' \him // insert 'him/her/them/it' \himself // insert 'himself/herself/themself/itself' \herself // same \hers // insert 'his/hers/theirs/its' \proper // used in an object name to force proper-noun behavior \improper // used in an object name to force improper-noun behavior \th // insert 1st, 2nd, 5th etc. \s // insert 's' if [] was plural \icon // insert icon of following [] \ref // insert a unique id for following [] \roman // insert following [] as a lower-case roman numeral \Roman // insert following [] as an upper-case roman numeral \... // suppress final new line \n // insert new line \" // insert double quote \\ // insert backslash \< // insert < (less than) \> // insert > (greater than) \(space) // skip a space \(newline) // skip a newline (and following space) All current text macros (not legacy). |
That's all of them? Hm, wonder where \red and \green and \blue and \yellow are located in the reference, then.
|
Artemio wrote:
That's all of them? Hm, wonder where \red and \green and \blue and \yellow are located in the reference, then. They're mentioned in html_encode (Note for BYOND oldies: the old-style formatting codes such as "\red" which are still parsed but not encouraged are completely stripped out by html_encode()), but they're legacy and no longer fully supported. |