Detect closing HTML tags after link.

(cherry picked from commit 2c505cb490fbe959494a133469010e5621f6ed6d)
Be explicit about closed HTML tags - only list items.

(cherry picked from commit 398933bac0d4cfa8b2293bb3b5cc4029c3bb0e3b)