Strange symbol shows up on website (L SEP)?

前端 未结 4 2005
醉酒成梦
醉酒成梦 2020-12-29 01:25

I noticed on my website, http://www.cscc.org.sg/, there\'s this odd symbol that shows up.

It says L SEP. In the HTML Code, it display the same thing.

<
4条回答
  •  再見小時候
    2020-12-29 01:50

    Some fonts render LS as L SEP. Such a glyph is designed for unformatted presentations of the character, such as when viewing the raw characters of a file in a binary editor. In a formatted presentation, actual line spacing should be displayed instead of the glyph.

    The problem is that neither the web server nor web browser are interpreting the LS as a newline. The web server could detect the LS and replace it with
    . Such a feature would fit well with a web server that dynamically generates HTML anyway, but would add overhead and complexity to a web server that serves file contents without modification.

    If a LS makes its way to the web browser, the web browser doesn't interpret it as formatting. Page formatting is based only on HTML tags. For example, LF and CR just affect formatting of the HTML source code, not the web page's formatting (except in

     sections). The browser could in principle interpret LS and PS (paragraph separator) as 
    and

    , but the HTML standard doesn't tell browsers to do that. (It seems to me like it would be a good addition.)

    To replace the raw LS character with the line separation that the content creator likely intended, you'll need to replace the LS characters with HTML markup such as
    .

提交回复
热议问题