diff options
author | Burt P <pburt0@gmail.com> | 2018-10-21 13:03:06 -0500 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2018-10-22 10:27:24 -0700 |
commit | 970174b0897d40b804808632784ffa1544d9da93 (patch) | |
tree | c0c98fc8c65301fdeb101e54724ab7714155d01b /modules/network.c | |
parent | df19b2ba34336e1a532377ef44da59dfb6616815 (diff) |
don't use html in text-only output
Fixes https://github.com/lpereira/hardinfo/issues/266
This is also needed so that vendor urls can be links where
appropriate.
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/network.c')
-rw-r--r-- | modules/network.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/network.c b/modules/network.c index f27a159a..fa61ddca 100644 --- a/modules/network.c +++ b/modules/network.c @@ -106,8 +106,13 @@ void scan_statistics(gboolean reload) gchar *tmp = buffer; while (*tmp && isspace(*tmp)) tmp++; - - __statistics = h_strdup_cprintf("<b> </b>#%d=%s\n", + /* the bolded-space/dot used here is a hardinfo shell hack */ + if (params.html_ok) + __statistics = h_strdup_cprintf("<b> </b>#%d=%s\n", + __statistics, + line++, tmp); + else + __statistics = h_strdup_cprintf(">#%d=%s\n", __statistics, line++, tmp); } |