kaffa / textpattern

Automatically exported from code.google.com/p/textpattern
0 stars 0 forks source link

hyperlink URLs with escape sequences are doubly-escaped #409

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start a new article
2. Create a hyperlink where the URL is already escaped such as:

   "Titanic":https://en.wikipedia.org/wiki/Titanic_%281997_film%29

3. Save the article and preview it

What is the expected output? What do you see instead?
The produced hyperlink is doubly-escaped. This should not be the case.

What version of the product are you using? On what operating system?
Textpattern 4.5.5

Please provide any additional information below.
The current workaround is to use HTML.

Original issue reported on code.google.com by seav80 on 9 Apr 2014 at 4:06

GoogleCodeExporter commented 8 years ago
The generation is done by PHP-Textile - https://github.com/textile/php-textile. 
The latest PHP-Textile version generates:

<p><a 
href="https://en.wikipedia.org/wiki/Titanic_%281997_film%29">Titanic</a></p>

Textpattern 4.5.5 uses PHP-Textile v2.2.x tree. 4.5 branch has been updated to 
the PHP-Textile v2.4.x tree which is the newest version that is backwards 
compatible with 2.2.x. The same behaviour stands in it too.

The Textpattern dev branch uses PHP-Textile 2.5.x which is the latest 
PHP-Textile version that supports PHP 5.2.0, but isn't backwards compatible 
with 2.2.x or 2.4.x and thus it can not be rolled into a patch release. 
PHP-Textile 2.5.x too doesn't encode URLs and provides same results and 
PHP-Textile 3.6-dev and PHP-Textile 3.5.x.

tldr; this rises from PHP-Textile. This has been 'fixed' in the Textpattern dev 
branch and the fix will be in Textpattern 4.6.0. Textpattern 4.5.6 will roll in 
the latest backwards compatible PHP-Textile version, but the 'issue' persists 
in that. Patches can not break backwards compatibility, so this would have to 
be fixed upstream in PHP-Textile to be resolved in backwards compatible 
fashion. But as 2.4.x is unsupported legacy version (released two years ago, 
and is back four-ish major.minor releases), this is unlikely to happen.

Original comment by jukka.m.svahn on 14 Apr 2014 at 9:39