This is really confusing behavior on the part of html5-tidy's handling
of command line arguments, but probably has to be this way for
historical reasons.  From the output you can see what's going on:

$ echo "" | tidy > /tmp/test.html
$ tidy -utf /tmp/test.html > /dev/null
HTML Tidy: unknown option: t
HTML Tidy: unknown option: f
...
$ echo $?
0

It's interpreting "-utf" as "-u -t -f"; -t doesn't exist so gets a
warning, but -u is a synonym for -upper:

$ tidy -h
 ...
 -upper, -u                 force tags to upper case                          

The -f option does exist so it's weird that it gives an 'unknown option'
warning for that too, but it does require a writeable filename so the
usage is wrong here anyway.

So, it does indeed give warnings on the invalid '-utf' option but
they're hard to spot in the output, and notably it does not exit with a
non-zero error code, so the error wouldn't be caught within a toolchain
or script.  This is a legit problem but kind of a confusing corner case
so I'm setting priority to Low.  This would be best reported and
addressed upstream, since there might be users depending on the current
behavior and changing it might have unintended consequences.

** Summary changed:

- uppercase-tags: no  in ~/.tidyrc conf has no effect
+ `tidy -utf` treated as `tidy -u -t -f` instead of as `tidy -utf8`, with no 
error

** Changed in: tidy-html5 (Ubuntu)
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914865

Title:
  `tidy -utf` treated as `tidy -u -t -f` instead of as `tidy -utf8`,
  with no error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tidy-html5/+bug/1914865/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to