Black box character in HTML?

I have built a tool that redacts text based on patterns.  I use this to remove sensitive information like social security numbers, credit cards, etc.  I am currently using this for HTML files.

Typically I just replace the text with the “X” character.  Instead of a “X” I am looking to use some type of Square character (I am thinking of just a black box).  I am not able to figure out how to do this for HTML files.

currentRegularExpressionsToSearch.redactionAsciCode = 88; //This is the asci code for an “X”, I want to do a square instead.

//This statement does the replace.
currentFileText = Regex.Replace(currentFileText, redactString, new String((char)currentRegularExpressionsToSearch.redactionAsciCode, redactString.Length));

Open in new window

Does anyone know if this is possible?  Hopefully what I am looking to do makes sense.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Arun MuruganCommented:
Use ASCII code 254.
rye004Author Commented:
Thank you Arun for your email.  I did try 254 before doing this posting.  This is what it looks like in a HTML file in Firefox.  I have attached a screenshot of what 254 looks like.
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
how about ■ ■
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Dave BaldwinFixer of ProblemsCommented:
That looks like UTF-8 characters.  Here is a demo using black boxes from .
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

<title>Black box character test</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<h1>Black box character test</h1>


Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
nice reference, Dave ~
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
found another html code for it:

Julian HansenCommented:
Just to be alternative.
.squares i {
  display: inline-block;
  background: url(images/dots.gif) no-repeat center center;
  width: 8px;
  height: 8px;

Open in new window

<span class="squares"><i></i><i></i><i></i><i></i></span>

Open in new window

ImagedotsWorking sample here
rye004Author Commented:
This worked great, thank you.

Thank you for taking the time to write out the HTML.
Dave BaldwinFixer of ProblemsCommented:
You're welcome, glad to help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.