angularjs - How To Properly Encode Tweets in Html (with c# hopefully) -


i'm programmatically building tweet end in #angularu of course blocks html point on. proper way encode tweet works , gives full message in html

<a ng-href="http://twitter.com/home?status=dan , john bringing  https://angularu.com/ng/session/2015sf/dan-and-john-bringing-their-view-on-the-latest-in-angular mon 11:00 speakers: wahlin @danwahlin, papa @john_papa #angularu @angularu " target="_blank" class="icon-twitter" href="http://twitter.com/home?status=dan , john bringing  https://angularu.com/ng/session/2015sf/dan-and-john-bringing-their-view-on-the-latest-in-angular mon 11:00 speakers: wahlin @danwahlin, papa @john_papa #angularu @angularu "></a> 

you want httputility.urlencode:

your link render this:

<a href="http://twitter.com/home?status=dan+and+john+blah%23angularu">tweet</a> 

for example, using uribuilder:

var builder = new uribuilder(uri.urischemehttp, "twitter.com", 80, "/home"); builder.query = "status=" + httputility.urlencode("dan , john attending #angularu"); var uri = builder.tostring(); 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -