Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5988883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:01:18+00:00 2026-05-22T23:01:18+00:00

Essentially, I’m grabbing source code which contains entities such as & and > which

  • 0

Essentially, I’m grabbing source code which contains entities such as & and > which I would like to replace with & and >, respectively. A simple string replace would be completely exhaustive because there are hundreds of possible entities that could show up in the source code. Is there a built-in or standard way to do it so I don’t have to type up a hundred lines of string replacements?

Thanks! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:01:19+00:00Added an answer on May 22, 2026 at 11:01 pm

    Perhaps the WebUtility.HtmlDecode Method is what you’re looking for

    The article gives an example using Powershell to call it

    HTMLDecode Sample - Using PowerShell
    <#
    .SYNOPSIS
        This script encodes and decodes an HTML String
    .DESCRIPTION
        This script used 
    .NOTES
        File Name  : Show-HtmlCoding.ps1
        Author     : Thomas Lee - tfl@psp.co.uk
        Requires   : PowerShell Version 2.0
    .LINK
        This script posted to:
            http://www.pshscripts.blogspot.com
        MSDN sample posted tot:
            http://msdn.microsoft.com/en-us/library/ee388364.aspx
    .EXAMPLE
        PSH [C:\foo]: .\Show-HtmlCoding.ps1
        Original String: <this is a string123> & so is this one??
        Encoded String : &lt;this is a string123&gt; &amp; so is this one??
        Decoded String : <this is a string123> & so is this one??
        Original string = Decoded string?: True   
    #>
    
    # Create string to encode/decode
    $Str = "<this is a string123> & so is this one??"
    
    # Encode String
    $Encstr = [System.Net.WebUtility]::HtmlEncode($str)
    
    # Decode String
    $Decstr = [System.Net.WebUtility]::HtmlDecode($EncStr)
    
    # Display strings
    "Original String: {0}" -f $Str
    "Encoded String : {0}" -f $Encstr
    "Decoded String : {0}" -f $Decstr
    $eq = ($str -eq $Decstr)
    "Original string = Decoded string?: {0}" -f $eq 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Essentially, I would like to create a database structure that allows for classifying an
Essentially I would like to apply a bottom-border , but rather than being in
Essentially, I have a dynamically generated local HTML form that I would like to
Essentially, I would like to know what a Lisp image is? Is it a
Essentially I would like to add a UIImage programmatically to my interface, using: [[self
Essentially I have an NSMutableArray which contains several NSDictionaries . I wish to sort
essentially i would just like the text of the loaded content. I've been researching
Essentially I'd like to know just how compatible are the iPhone and the iPod
Essentially I have a method of a class called killProgram, which is intended to
Essentially I've got a table holding user data, all of which is AES encrypted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.