Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Pod-Simple CPAN distribution.

Report information
The Basics
Id: 93491
Status: rejected
Priority: 0/
Queue: Pod-Simple

People
Owner: Nobody in particular
Requestors: tsibley [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 3.28
Fixed in: (no value)



Subject: Newlines inside L<> render incorrectly in Pod::Simple::XHTML
See metacpan's rendering of the links at the bottom of <https://metacpan.org/pod/Search::GIN>. Pod::Simple::XHTML is used as the renderer. FWIW, Pod::Html gets this wrong too (perldoc -m Search::GIN | pod2html) but in a different way.
Subject: Re: [rt.cpan.org #93491] Newlines inside L<> render incorrectly in Pod::Simple::XHTML
Date: Mon, 3 Mar 2014 10:31:30 -0800
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Mar 3, 2014, at 10:07 AM, Thomas Sibley via RT <bug-Pod-Simple@rt.cpan.org> wrote: Show quoted text
> See metacpan's rendering of the links at the bottom of <https://metacpan.org/pod/Search::GIN>. Pod::Simple::XHTML is used as the renderer. > > FWIW, Pod::Html gets this wrong too (perldoc -m Search::GIN | pod2html) but in a different way.
I suppose that the \n should be replaced with %0A. Those URLs would still be broken, though. Who puts newlines in URLs?
On Mon Mar 03 10:31:42 2014, DWHEELER wrote: Show quoted text
> On Mar 3, 2014, at 10:07 AM, Thomas Sibley via RT <bug-Pod- > Simple@rt.cpan.org> wrote: >
> > See metacpan's rendering of the links at the bottom of > > <https://metacpan.org/pod/Search::GIN>. Pod::Simple::XHTML is used as > > the renderer. > > > > FWIW, Pod::Html gets this wrong too (perldoc -m Search::GIN | > > pod2html) but in a different way.
> > I suppose that the \n should be replaced with %0A. Those URLs would > still be broken, though. Who puts newlines in URLs?
Well, maybe. I did open a ticket against Search::GIN (#93490). But traditionally POD ignores newlines when formatting blocks. I expect that newlines should just be ignored inside L<> and the folks who are crazy enough to put newlines in URLs can use %0A.
Show quoted text
> I suppose that the \n should be replaced with %0A. Those URLs would > still be broken, though. Who puts newlines in URLs?
https://rt.cpan.org/Ticket/Display.html?id=95710 Related, but that is different. 95710 is there for a newline after the pipe to make the documents readable and maintanable. In that case the newline is not *inside* the URL, but in front of the url --8<--- This is text that contains a L<link to web article| http://some.web.net/long/and/winding/path/article.html> so it might fit in the editor window -->8---
Well, here is the code that detects a URL: https://github.com/theory/pod-simple/blob/master/lib/Pod/Simple.pm#L1102 next unless $ell->[$_] =~ m/^(?:([^|]*)\|)?(\w+:[^:\s]\S*)$/s; It explicitly excludes whitespace. When I add a test with whitespace, I end up with <a href="http://search.cpan.org/perldoc?http:#link.included.here-foo">Boo</a> Nice, huh? I guess the question then is, should we extend the definition of a URL allowed in L<> to include whitespace?
Following this discussion on pod-people, I'm going to reject this report. URLs simply should not have white space in them. http://www.mail-archive.com/pod-people@perl.org/msg01721.html Thanks for the report!