You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately "download link":<txp:file_download_link id="1" /> is not really valid HTML. This mixes two different templating and syntax languages, which is bound to cause issues. See, Textile has no idea of Textpattern CMS syntax or that it even exists.
If we were to allow <txp:file_download_link id="1" /> to be used as the link URL, it would get sanitized and escaped by PHP-Textile, which in return would mean that the other parser would not pick up that other templating tag.
Textile itself has no understanding of that other language, and as general purpose formatting library and it should not have hard tie-ins to other systems.
The best option in these cases would be to not mix the two languages. Instead, better option would be either use raw HTML, or the other templating languages features.
Could we allow such syntax to be used in Textile? Sure, but it causes it own set of weird, such as Textile allowing and generating outright invalid output document.
Realistically this would require major rewrite of the Textile library with a way of supporting different output document formats. For instance, Textpattern CMS could implement their own output document format that for instance, doesn't sanitize links.
We currently allow raw-blocks, but those are independent of allowing outright invalid syntax to be generated by PHP-Textile; while it also works for Textpatern's templating syntax, it's for developed with universal raw HTML support in mind.
Prerequisites
[x ] Are you running the latest version of PHP-Textile?
Problematic Textile markup
Trying to use the Textpattern single tag
<txp:file_download_link />
to create a hyperlink failsExpected output
Actual output
Additional information
PHP-Textile version: v3.7.6
PHP version: PHP 8.1.3 (PHP-FPM)
The text was updated successfully, but these errors were encountered: