![]() |
Text convert for Markup |
Post Reply
|
| Author | |
jimmy
Senior Member
Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
Quote Reply
Topic: Text convert for MarkupPosted: 25 September 2009 at 2:18am |
|
Hello,
Is there a function to convert a user text to a showable text under Markup Tooltip. Convert '>' to '>', ... We use XTP 12.0.2 Jimmy |
|
![]() |
|
ijwelch
Senior Member
Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 September 2009 at 10:25pm |
|
Not built in. This is VB code I've been using:
Public Function FormatXAMLText(ByVal s As String) As String s = Replace$(s, "&", "&") s = Replace$(s, "<", "<") s = Replace$(s, ">", "&rt;") s = Replace$(s, Chr(34), """) s = Replace$(s, "'", "'") s = Replace$(s, " ", " ") FormatXAMLText = s End Function |
|
|
ExtremeSuitePro 12.1.1
WinXP SP3 |
|
![]() |
|
jimmy
Senior Member
Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 September 2009 at 6:14am |
|
Hi,
also must convert \n -> \#10 new line ' ' -> \#32 space Jimmy |
|
![]() |
|
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 September 2009 at 9:05am |
|
I've been looking for such a function for years. In PHP you simply call htmlspecialchars(). In MFC it seems you have to implement it yourself. Tedious...
|
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
jimmy
Senior Member
Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 September 2009 at 3:36am |
|
Wish:
Add this to Codejock Library. Jimmy |
|
![]() |
|
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 September 2009 at 11:34am |
|
Maybe such a function exists in ATL?
|
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |