According to [0], "pre-line" and "pre-wrap" are valid values for "white-space", and making them behave like "pre" seems decent. Since scanner_token_contains() internally acts like strcasecmp() rather than strstr(), these weren't being picked up.
Changing scanner_token_contains() to use strstr breaks lots of other things, so adding "pre-wrap" and "pre-line" seems the least intrusive change. [0] https://www.w3.org/TR/CSS2/text.html#white-space-prop --- src/document/css/value.c | 6 ++++++ 1 file changed, 6 insertions(+) For an in-the-wild use of these values for white-space, see e.g. http://www.tedunangst.com/flak/post/exfiltration-via-request-timing diff --git a/src/document/css/value.c b/src/document/css/value.c index 3d96285e..077590e8 100644 --- a/src/document/css/value.c +++ b/src/document/css/value.c @@ -353,6 +353,12 @@ css_parse_white_space_value(struct css_property_info *propinfo, if (scanner_token_contains(token, "pre")) { value->font_attribute.add |= AT_PREFORMATTED; + } else if (scanner_token_contains(token, "pre-wrap")) { + value->font_attribute.add |= AT_PREFORMATTED; + + } else if (scanner_token_contains(token, "pre-line")) { + value->font_attribute.add |= AT_PREFORMATTED; + } else if (scanner_token_contains(token, "normal")) { value->font_attribute.rem |= AT_PREFORMATTED; -- 2.12.2 -- http://lists.linuxfromscratch.org/listinfo/elinks-dev Unsubscribe: See the above information page