Bug #14938

"Insert/Modify Link" dialogue chokes on javascript values for links because of incorrectly prepended 'http://'

Added by Christopher almost 8 years ago. Updated almost 7 years ago.

Status:New Start date:2005-08-23
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
TYPO3 Version:3.8.0 Complexity:
PHP Version:4
Votes: 0

Description

See above.

Try to insert a javascript link (e.g. "javascript:history.go(-1);") via any link dialogue in the BE; upon saving the record, the link is prepended with 'http://'. Problems:

a) This renders the link unusable
b) If the record is now resaved, the link (which now reads "http://javascript:history.go(-1);"), the following error message appears (but changes to the record are saved to db):

Warning: parse_url(http://javascript:history.go(-1);): Unable to parse url in /home/chancent/bin/typo3_src-3.8.0/t3lib/class.t3lib_parsehtml_proc.php on line 1444

Clearly, the problem is with part (a) where the link value incorrectly gets 'http://' added to it. I assume that the linking is done using the typolink function which does not, in itself, have any problem with 'javascript:foobar();' links. E.g. this:

lib.backLink = HTML
lib.backLink {
value = « Previous Page
value.typolink.parameter = javascript:history.back(1);
}

...works.

-Christopher

(issue imported from #M1397)

Also available in: Atom PDF