W
W
weranda2019-04-22 19:21:14
HTML
weranda, 2019-04-22 19:21:14

How to detect hidden character in markup?

Greetings
I faced this for the first time and I do not know what to do. The situation is this:
There is an HTML page with a word, inside this word there is a certain hidden character called a hidden hyphen.
If you open the document in the editor, the picture will be like this:
5cbde79eeae06464543933.png
At first glance, nothing strange.
Let's open the source code of the page in Chrome:
5cbde7d7db3f8515586630.png
At a second glance, nothing strange either, neither in the previous nor in this case, nothing suspicious at all.
We look at how this code looks in the browser, and it looks like this:
5cbde88f547aa209655374.png
And again, everything is normal, but in fact, not everything is normal. If you open the developer tools in Chrome, then we will see the code for this hidden transfer, here it is:
5cbde8db56b5e935296630.png
I posted all this on Codepen .
I have no idea how to catch this code, find and replace it. If you download the page and try to find the HTML entity of this code ­, then it will not be found. Since not a single editor that I have on my computer simply sees it. Maybe I'm looking in the wrong way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2019-04-22
@weranda

This symbol has been in use for 20 years
https://en.wikipedia.org/wiki/Soft_hyphen
What exactly do you want to do with it and why?
The symbol itself is useless, so compare two texts that are the same, but one with a soft hyphenation, and the other without

E
Evgeny Volf, 2019-04-22
@Wolfnsex

Since not a single editor that I have on my computer simply sees it. Maybe I'm looking in the wrong way?
Apparently so. Notepad++ sees it for me, it looks like this: 5cbdf017b1b40962463015.png
By the way, it is also displayed by CodePen (at least for me). In Notepad++ it is visible even with the "default" settings, but you can additionally enable the display of all symbols: Menu -> View -> Display symbols -> Display all symbols . There is a similar mode in many other editors, for example, this symbol is also displayed in PhpStorm (and for sure in all other JetBrains IDEs).
By itself, the symbol that you designated is the so-called. "soft wrap" and usually such characters in the HTML code are written in code. Details here .
PS If your task is to "find" and delete all such characters "by hand" - just open the acc. files in Notepad++ (or try to enable display of non-printing characters in your editor).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question