Convert Text in HTML-compliant Text


posted by Tobias Weltner
11-27-2008

Downloads: 380
File size: 151 B
Views: 3,829

Embed
Convert Text in HTML-compliant Text
  1. function Escape-String($name) { 
  2.     [System.Uri]::EscapeDataString($name
  3.  
  4. Escape-String "Hello World" 
  5. Escape-String "<h1>Hello World</h1>" 
The function Escape-String automatically converts raw string data into an encoded format. All special characters that may be misinterpreted by HTML pages are converted into safely encoded text.
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.