Live data from Hacker News

Show HN: Markdown HN profiles at {user}.at.hn

at.hn

21–30 of 169 posts

Re: Show HN: Markdown HN profiles at {user}.at.hn

#22
post #21

I updated my profile but I don't see any change on my at.hn page - how long does it cache for?

You failed at step 1 of instructions... > To opt-in, paste "{your username}.at.hn" anywhere in your profile's 'about' section.

OK, that doesn't actually appear to be necessary because mine works without opting in.

"2. Go to https://{username}.at.hn?refresh." did the trick.

Re: Show HN: Markdown HN profiles at {user}.at.hn

#23

I updated my profile but I don't see any change on my at.hn page - how long does it cache for?

I don't see a change in your profile. See here: https://hn.algolia.com/api/v1/users/jstanley I can't see 'jstanley.at.hn' in there at all [..?]

That doesn't seem to be necessary, https://jstanley.at.hn/ works fine?

Re: Show HN: Markdown HN profiles at {user}.at.hn

#24

There seems to be some weird encoding issues and failure to convert URLs to links properly, for my profile - https://mike-cardwell.at.hn/ - Also, some of the indenting and white space is broken making the PGP signature invalid

Whoops. Yeh I'm working on the encoding thing atm. Thank you for flagging! EDIT: I'm relying on the 'marked' npm package for markdown and it is handling the linkification of URLs, sometimes badly. Shall work on it.

Since marked doesn't do it for you, make sure you sanitize the user input (the text on the user profiles) before rendering it to visitors.

Some libraries for doing that with good defaults:

- https://github.com/cure53/DOMPurify

- https://github.com/apostrophecms/sanitize-html

- https://github.com/bevacqua/insane

(right now your site looks vulnerable to XSS)

Re: Show HN: Markdown HN profiles at {user}.at.hn

#27
post #24

Earlier quoted context omitted.

Whoops. Yeh I'm working on the encoding thing atm. Thank you for flagging! EDIT: I'm relying on the 'marked' npm package for markdown and it is handling the linkification of URLs, sometimes badly. Shall work on it.

Since marked doesn't do it for you, make sure you sanitize the user input (the text on the user profiles) before rendering it to visitors. Some libraries for doing that with good defaults: - https://github.com/cure53/DOMPurify - https://github.com/apostrophecms/sanitize-html - https://github.com/bevacqua/insane (right now your site looks vulnerable to XSS)

Yeh I'm sanitizing already thankfully. I've fixed the decoding issue, but I'm expecting some % of users to be borked for a whole other variety of quirky reasons.

Re: Show HN: Markdown HN profiles at {user}.at.hn

#30
post #24

Earlier quoted context omitted.

Since marked doesn't do it for you, make sure you sanitize the user input (the text on the user profiles) before rendering it to visitors. Some libraries for doing that with good defaults: - https://github.com/cure53/DOMPurify - https://github.com/apostrophecms/sanitize-html - https://github.com/bevacqua/insane (right now your site looks vulnerable to XSS)

Yeh I'm sanitizing already thankfully. I've fixed the decoding issue, but I'm expecting some % of users to be borked for a whole other variety of quirky reasons.

Nice :)

Ah, I bet you discovered that subdomains aren't case-sensitive while HN usernames are case-sensitive, didn't you? :)

Post reply on HN