rye004
asked on
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.
Does anyone know if this is possible? Hopefully what I am looking to do makes sense.
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));
Does anyone know if this is possible? Hopefully what I am looking to do makes sense.
Use ASCII code 254.
ASKER
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.
temp.jpg
temp.jpg
how about ■ ■
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
nice reference, Dave ~
found another html code for it:
▪
▪
Just to be alternative.
CSS
CSS
.squares i {
display: inline-block;
background: url(images/dots.gif) no-repeat center center;
width: 8px;
height: 8px;
}
HTML<span class="squares"><i></i><i></i><i></i><i></i></span>
ImageWorking sample here
ASKER
This worked great, thank you.
Thank you for taking the time to write out the HTML.
Thank you for taking the time to write out the HTML.
You're welcome, glad to help.