menu

arrow_back Where the line break inside the tag?

by
0 votes
when reading of the term appear to line break
here is a screenshot from the debugger
5b30c1156318d122612753.jpeg


respectively, but a piece of code which falls on it, TC can not key in the array display data
5b30c119cbf2c851585842.jpeg


может ли это быть связано с методом получения текста из тэгов html?

или же надо делать что-то на php до вывода?


на пыхе все эти термины обрабатываются так
trim(str_replace(chr(194) . chr(160), ' ', $string));

4 Comments

Maxim that is what has helped ATP big
ThunderCat , var_dump() does nothing, in both cases (the words where these characters appear and those where they do not appear) blaze gives all "nice", it turns out this "garbage" gets there from the front
Use the trim method on termKey, will help to get rid of the newline. Another question where do they come from
It all matters on the level, "why isn't it working???", 3 minutes on the balance of var_dump() in the right places will solve your problem.

2 Answers

by
 
Best answer
0 votes
SPS Maxim @mbelskiy
Use the trim method on termKey, will help to get rid of the newline. Another question where do they come from
by
0 votes
Use Node.textContent to retrieve the correct copy of the contents of these text nodes.