Project

General

Profile

Actions

Bug #65705

closed

baseURL determination of EXT:rtehtmlare fails in edge case

Added by Lorenz Ulrich about 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2015-03-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The RTE has a client-side method of determining the baseURL. The baseURL is later used for loading additional resources (e.g. custom CSS). It first tries to use the document.baseURI property (which isn't present in IE), with fallbacks to the base href in the content and the whole URL. To ensure that the baseURL is only the path to the TYPO3 installation (without a document or arguments), a Regex rule is then applied to extract the path to TYPO3:

if (this.baseURL && this.baseURL.match(/(.*\:\/\/.*\/)[^\/]*/)) {
    this.baseURL = RegExp.$1;
}

This works perfectly for standard URLs such as https://mydomain.tld/typo3/alt_doc.php?foo=bar; the RegExp returns https://mydomain.tld/typo3/.

But if the URL of the page contains another fully qualified URL, the Regex fails and the whole URL is taken. For https://mydomain.tld/typo3/alt_doc.php?returnUrl=https://mydomain.tld/typo3/something.php, the whole input string is returned. This leads to a wrong baseURL and makes the browsers (tested: Firefox) fail to load the resources.

The Regex needs to be improved.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #65608: BaseURL is wrong in Frontend when using RealURL with config.absRefPrefixClosed2015-03-09

Actions
Related to TYPO3 Core - Bug #79568: baseURL determination of EXT:rtehtmlarea fails in frontend editingClosed2017-01-31

Actions
Actions

Also available in: Atom PDF