-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing the inconsistent rendering of haddocks across hackage #1349
Comments
So afaiu at the moment, how it works is that hackage-server just loads the tarball and then serves whatever file from the tarball that was requested. I guess to replace the css then, whenever we match on a css path, we would serve our own css :3. hackage-server/src/Distribution/Server/Features/Documentation.hs Lines 296 to 298 in 962b6d7
Also, it appears hackage-server already does something like this: |
I agree it's annoying to have to look at the outdated haddock styles. I wondered if it's possible to do something along the proposed lines. OTOH, it won't be easy to build a consensus behind what appears to be a rather drastic measure -- to override the contents of user-generated archives... |
In my opinion user generated archives shouldn't be a thing at all. I think it would be even be a good idea to throw away everything that isn't enclosed in the html type and then some tags that may be dangerous. (like <script> etc.) But I guess this ship has sailed anyways cf package tarball uploads / malicious template Haskell / safe Haskell kinda not being a thing anymore etc. |
I think I have a pretty "simple" idea for a fix here. How about we
That way we wouldn't get outdated styles.
The text was updated successfully, but these errors were encountered: