pouët.net

"Go to Pouet, but not to the BBS"

category: offtopic [glöplog]
Ok, sent a pull request, I'm new to this so... sorry if I fucked up :(
added on the 2012-08-25 18:53:26 by Tomoya Tomoya
Whoops, didn't see your pull request Tomoya - but thanks! :)

Narrowed it a bit down, so it's not running everywhere - only where needed. Not sure if these needs to be fixed for the UserScript as well, but ppl will complain if that's the case :3

tl;dr [X] fixed
added on the 2012-08-25 18:57:26 by mog mog
Thanks for the pull request.
A good idea with some good ideas in its implementation ( fixing the split htmlentities ). I'll check another approach than the jungle hunt and all the hoops in the DOM to find the HTML entities. :p
added on the 2012-08-25 22:49:04 by p01 p01
Well, so insane it sounds, but it was the most sane approach to make sure it only targets the oneliner on both pages. That parentNode thing still makes me cringe though :P
added on the 2012-08-25 23:05:47 by mog mog
unicode.user.js uses XPATH to find all the elements whose text contain a & character, then it replaces the & by a single & and look for the Թ sequences ( withstanding linebreaks ) and replace them by the corresponding character. This works everywhere: onliner, comments, prod title, group names, etc...

How do you like this approach ?
added on the 2012-08-26 23:47:30 by p01 p01
I don't see how this is more elegant than to tell gargaj to just pass the onliner to html_entity_decode() ;)
added on the 2012-08-27 00:15:33 by D.Fox D.Fox
dfox:

Code:<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">


he won't be able to do that until pouet v2, so guys... just wait for it.
BB Image

Saga: Your point being?

Just saved the page as HTML, replaced the & to & and voila, it displays correctly, even with the "wrong" encoding in the header.

It might be a different story for the complete platform - but this seems to be working just fine.
added on the 2012-08-27 00:30:49 by D.Fox D.Fox
well i guess i just misunderstood your idea - i thought you want to double-decode the double-encoded entities (which would result in plain unicode characters in an ISO-encoded file) - however I guess it would be the easiest (TM) to fix the DB storage rather than its output, which is something that gargaj is obviously going to do.
p01: As it seems to work everywhere else, even in the BBS I didn't find it necessary, apart from some odd encoded names. Other than that, I didn't really wanted to fuck with the site, and introduce loopholes - or odd stuff he later has to fix. Kudos though :)
added on the 2012-08-27 01:35:55 by mog mog

login