Zola: Anchor checker only looks for lowercase `id =`/`name=`

Created on 17 Feb 2020  Â·  3Comments  Â·  Source: getzola/zola

Bug Report

The zola check command reports https://www.math.utah.edu/docs/info/ld_3.html#SEC12 as "anchor not found" because the page uses uppercase HTML tags and attributes:

<A NAME="SEC12" HREF="…">

The relevant part of the code is:

https://github.com/getzola/zola/blob/1972e58823417a58eb1cc646ee346e7c3b04addb/components/link_checker/src/lib.rs#L118-L123

(I don't know if the HTML standard allows uppercase HTML attributes, but my browser seems to handle without problem.)

Environment

Zola version: 0.10.0

bug done

All 3 comments

ah of course :(

would it be a bad idea to simply convert the html to lowercase? That feels like there must be some hidden problem with that, but seems like the better solution than just adding uppercase versions of the html fields. since

<div cLaSs=“carl”></div> 

wouldn’t match just with the addition of more cases

Sent with GitHawk

An issue with lowercasing the HTML is if you have some unicode chars, you might have an anchor value that might not match what was given.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NuLL3rr0r picture NuLL3rr0r  Â·  6Comments

sternj picture sternj  Â·  6Comments

svenstaro picture svenstaro  Â·  5Comments

anthonychwong picture anthonychwong  Â·  4Comments

snsvrno picture snsvrno  Â·  4Comments