Nested links permitted #8

Open
stocks29 opened this Issue Jan 23, 2010 · 0 comments

Comments

Projects
None yet
1 participant

Currently it is possible to create nested links. Based on the W3C standard, A elements cannot contain other elements:

http://www.w3.org/TR/html4/struct/links.html#h-12.2.2

Here is a test case:

use strict;
use warnings;

use Test::More tests => 1;
use Text::Markdown;

my $markdown = q{

  1. * x
  2. * %61%6C%65%72%74%28%27%78%73%73%27%29%3B](onmouseover=eval(unescape(this.innerHTML.substr(4)))//)
    };

my $output = Text::Markdown::markdown( $markdown );

unlike( $output,
qr{<a\shref="<a\shref=}xms,
'No nested links found in output' );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment