{"id":608,"date":"2011-06-28T12:46:44","date_gmt":"2011-06-28T12:46:44","guid":{"rendered":"https:\/\/ibex.tech\/visualcpp\/?p=608"},"modified":"2022-02-17T06:24:04","modified_gmt":"2022-02-17T06:24:04","slug":"uri-encode-string","status":"publish","type":"post","link":"https:\/\/ibex.tech\/visualcpp\/strings\/uri-encode-string","title":{"rendered":"URI Encode String"},"content":{"rendered":"<pre>\r\n<code>\r\n\tConvertedString = System::Web::HttpUtility::HtmlEncode(SomeString);\r\n\tConvertedString = System::Web::HttpUtility::UrlEncode(SomeString);\r\n<\/code><\/pre>\n<p>\nIf its not available select project proiperties&nbsp;&gt; Framework &amp; References &gt; add a reference to System.Web\n<\/p>\n<p>\nHtmlEncode&nbsp;&#8211;&nbsp;HTML encoding makes sure that text is displayed correctly in the browser and not interpreted by the browser as HTML.\n<\/p>\n<p>\nUrlEncode &#8211;&nbsp;Encodes a URL string. These method overloads can be used to encode the entire URL, including query-string values.\n<\/p>\n<h4>\nMaking Strings Filename Safe<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n\tfor each (wchar_t c in IO::Path::GetInvalidFileNameChars())\r\n\t\tsTemp = sTemp-&gt;Replace(Convert::ToString(c), &quot;&quot;);\r\n<\/code><\/pre>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ConvertedString = System::Web::HttpUtility::HtmlEncode(SomeString); ConvertedString = System::Web::HttpUtility::UrlEncode(SomeString); If its not available select project proiperties&nbsp;&gt; Framework &amp; References &gt; add a reference to System.Web HtmlEncode&nbsp;&#8211;&nbsp;HTML encoding makes sure that text is displayed correctly in the browser and not interpreted by the browser as HTML. UrlEncode &#8211;&nbsp;Encodes a URL string. These method overloads can be used to encode [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-608","post","type-post","status-publish","format-standard","hentry","category-strings"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/comments?post=608"}],"version-history":[{"count":8,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/608\/revisions"}],"predecessor-version":[{"id":1417,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/608\/revisions\/1417"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/media?parent=608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/categories?post=608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/tags?post=608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}