The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2017-04-15

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:49 Lee joined #mojo
01:21 marty joined #mojo
01:54 marty joined #mojo
02:09 marty joined #mojo
02:20 noganex_ joined #mojo
02:26 marty joined #mojo
03:56 npnth joined #mojo
03:57 marty joined #mojo
04:01 npnth I'm using Mojo in Elinks hooks. The site is sending me UTF-8 (it is not encoding "–" as "ߝ" or such), and if my pre_format_html_hook is "my $dom = Mojo::DOM->new($html); return $dom->to_string", all the non-ASCII becomes garbled.
04:02 npnth However, if I fiddle with the $dom before writing it out (i.e. "$dom->find('foo')->each(sub {$_->replace('▲');});"), that character works just fine.
04:03 npnth Is there some sort of flag I need to set when I DOM->new in order to handle this correctly?
04:04 dboehmer_ joined #mojo
04:46 Grinnz how are you writing it out?
04:47 Grinnz or where are you reading it from?
04:47 Grinnz if the input is characters the output would be characters
05:06 npnth I'm not really sure - it comes through the Elinks hooks, and gets returned back through there.
05:07 npnth It looks like changing the $dom initialization to "my $dom = Mojo::DOM->new(decode('UTF-8', $html));" fixes it, though.
07:36 Vandal joined #mojo
09:16 dod joined #mojo
09:20 dod joined #mojo
11:59 sri that's how it should be handled
12:16 dod joined #mojo
13:14 janl joined #mojo
13:15 stryx` joined #mojo
13:25 janl joined #mojo
13:45 kes joined #mojo
14:45 maschine joined #mojo
14:46 maschine jberger, is there a way to make   my $url = $self->url_for('confirm')->to_abs->query(jwt => $jwt); default to https?
14:46 maschine it always sends out an http: link, which initially doesn't work (until the server redirects to https on the next try)
14:48 pink_mist is your app running behind a reverse proxy?
14:49 maschine yes
14:49 pink_mist because it sounds like you simply forgot to start your app with the MOJO_REVERSE_PROXY environmental variable set
14:50 pink_mist I suggest you restart it with that varible set to a true value in the environment
14:50 maschine ok thanks I'll try that
15:03 maschine actually I think the link was working anyway, it was another flash vs stash issue..
15:33 sh14 joined #mojo
15:57 marty joined #mojo
16:12 PryMar56 joined #mojo
16:38 VVelox joined #mojo
17:42 marty joined #mojo
19:45 [0xAF] joined #mojo
20:03 [0xAF] hi, is there a way to get mojo log in colors? i found no way so far, so i guess i can craft something from  Log::Simple::Color (or another log colorizer) and Mojo::Log::More (for example) to get more shiny log output.
20:14 stryx` joined #mojo
20:20 preaction you could just set up a formatter sub
20:21 [0xAF] preaction: i'm just reading Mojo::Log::More and it seems it does what you say.
20:23 [0xAF] preaction: so your suggestion is a just what i needed... no need for plugin/module, just the formater sub ...
20:23 [0xAF] preaction: thanks.
22:27 kgoess joined #mojo
23:13 npnth left #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary