If I enter a link without the second quote such as <a href="mailto:email@example.com>Mail Me</a>, then all the buttons below become active for the mailto link. Might be similar issues with 'http', but I did not test that.

-albert

Comments

jbrauer’s picture

Priority: Normal » Minor
Status: Active » Closed (works as designed)

This is a HTML issue. If you have a page with invalid HTML (i.e. missing the required close quote inside the <a> tag) then there is not something that Drupal should do with it. It would be possible to write a routine to syntax check all content before it goes out but that would be a lot of overhead for little gain. Even if you put a <a> tag in a comment without any arguments in this forum the balance of the page will be turned into a link by Safari (and different browsers may handle this invalid HTML differently).

albertsmith’s picture

Thanks for the info. All I can say is that it was a major pain to get rid of a page with this issue (due to my own incompetent typing). "By design" does equal "pain in the butt" at times.

-albert

chx’s picture

Status: Closed (works as designed) » Fixed

I have not checked but strongly believe that this is fixed somewhat in 4.6.4

puregin’s picture

Haven't we all done this at one time or another :)

There's a number of possible ways to mitigate this:

1) Install a WYSIWYG editor such as FCKEditor (contributed module)

2) Install HTML Corrector (to closed tags and clean up HTML)

3) Use BBCode or another simplified input format to allow users to submit links in a more robust syntax.

There may be other modules which help with this, have a look :)

Djun

Ariel T Glenn’s picture

Status: Fixed » Closed (works as designed)

This is still broken in CVS (downloaded drupal-cvs.tar.gz Dec 7 in the morning and tested it today, Dec 8). Drupal doesn't need to syntax check user HTML but it does need to do something so that the Submit Page functionality isn't borked by a user typo.

Ariel T Glenn’s picture

A few more details: it's broken either with a missing quote or a missing close href tag. When I save the Submit Page out to disk and look atat it, I see a whole lot of added <a href="mailto:ariel@localhost"> ... </a> around everything, including around many hidden variables in the form, and the various buttons like the Preview and Submit buttons. So this is something that Drupal is adding, for some reason, and should not be.

Browser: Firefox 1.5
OS: Linux (FC4, latest updates, etc.)
Drupal configuration: standard out of the box, no additional modules enabled, defaults for almost everything (except that clean urls are enabled).