What disadvantages do tons of legal entities have?

I wrote a source converter to display a small project. Basically, it takes input and converts the input into output displayed by the browser (I think it looks like Wikipedia).

There is an idea, but it does not look like the MediaWiki style and does not look like the MarkDown style. He has several innovations. For example, when a user enters spaces in a chain, I assume that he wants to keep spaces. Since html ignores spaces by default, I thought about converting this string of spaces to the appropriate   (e.g. 3 spaces in a string converted to 1   )

So what is happening is that I can foresee the possibility of tons of   tags per message (and on one page there can be several messages).

I heard a lot of anti-ipsps on the Internet, but most of them come down to readability of headaches (in this case, the input is provided by the user. If he decides to make his message unreadable, he can do it with any other formatting actions provided) or service headaches (which in this case, not, since this is the converted output).

I wonder what the disadvantages of having   tags on a web page?

+4
source share
4 answers

If it is simply dumped onto the client, it is simply a matter of size, and if it is compressed, it hardly matters in terms of network traffic.

This will slow down the rendering, I'm sure, and take up the DOM space, but whether it depends on what I don’t know about your use case. You may be able to achieve the same result in other ways; not sure.

+1
source

You represent each space as   ?

Also, to waste so much bandwidth, this will not allow dynamic line breaks, since "nbsp" means "* n * on * b * reaking * sp * ace". This is likely to cause big problems.

+2
source

  are not tags, but are character objects such as © , < , > etc.

I would say that the flaws would be readable. When I see a word, I expect the interval to be constant (if it is not in the block with valid text).

Can you show me the case when you need   s?

+1
source

Do you consider it an attempt to find out what the user, having inserted these spaces, is really trying to achieve? Instead of (they want to insert spaces) that (if spaces are at the beginning of the line, they want indents from the text).

An example of this is that many programming sites convert 4 spaces at the beginning of a line to a pre + code block.

For your purposes, perhaps this should be a <block> block.

The ultimate goal is to transform spaces, not what is intended for the user (with limited resources), but rather what they wanted to convey with him.

0
source

All Articles