[TYPO3-core] Partial fix to bugtracker 1303: if i use "config.locale_all = tr_TR", links in FE are broken
Stanislas Rolland
stanislas.rolland at fructifor.ca
Wed Mar 29 17:48:38 CEST 2006
Reposting.
This simple patch will make the RTE usable by Turkish sites using the
tr_TR locale.
The real problem is that frontend rendering will apply strtolower to
'LINK', thus replacing the non-dotted uppercase I with a non-dotted
lowercase ? when locale tr_TR is used. This transformation breaks the
rendering of the typolink. This patch, while not a complete solution,
will at least make the RTE work in TYPO3 4.0.
> This is a CVS patch request.
>
> Type: Bugfix
>
> Description: This is a partial fix only: links created in the RTE will be correctly rendered in the frontend when config.locale_all = tr_TR is used. Tested by Gür Yildirim.
>
> Branches: TYPO3_4-0
>
> Bugtracker reference: http://bugs.typo3.org/view.php?id=1303
>
> Regards,
> Stanislas
>
> ------------------------------------------------------------------------
>
> Index: t3lib/class.t3lib_parsehtml_proc.php
> ===================================================================
> RCS file: /cvsroot/typo3/TYPO3core/t3lib/class.t3lib_parsehtml_proc.php,v
> retrieving revision 1.20.2.4
> diff -u -r1.20.2.4 class.t3lib_parsehtml_proc.php
> --- t3lib/class.t3lib_parsehtml_proc.php 8 Feb 2006 15:35:07 -0000 1.20.2.4
> +++ t3lib/class.t3lib_parsehtml_proc.php 25 Mar 2006 22:58:42 -0000
> @@ -616,7 +616,7 @@
>
> /**
> * Transformation handler: 'ts_links' / direction: "db"
> - * Converting <A>-tags to <LINK tags>
> + * Converting <A>-tags to <link tags>
> *
> * @param string Content input
> * @return string Content output
> @@ -643,8 +643,8 @@
> }
> if (!count($attribArray_copy)) { // Only if href, target and class are the only attributes, we can alter the link!
> // Creating the TYPO3 pseudo-tag "<LINK>" for the link (includes href/url, target and class attributes):
> - $bTag='<LINK '.$info['url'].($attribArray['target']?' '.$attribArray['target']:(($attribArray['class'] || $attribArray['title'])?' -':'')).($attribArray['class']?' '.$attribArray['class']:($attribArray['title']?' -':'')).($attribArray['title']?' "'.$attribArray['title'].'"':'').'>';
> - $eTag='</LINK>';
> + $bTag='<link '.$info['url'].($attribArray['target']?' '.$attribArray['target']:(($attribArray['class'] || $attribArray['title'])?' -':'')).($attribArray['class']?' '.$attribArray['class']:($attribArray['title']?' -':'')).($attribArray['title']?' "'.$attribArray['title'].'"':'').'>';
> + $eTag='</link>';
> $blockSplit[$k] = $bTag.$this->TS_links_db($this->removeFirstAndLastTag($blockSplit[$k])).$eTag;
> } else { // ... otherwise store the link as a-tag.
> // Unsetting 'rtekeep' attribute if that had been set.
> @@ -665,7 +665,7 @@
>
> /**
> * Transformation handler: 'ts_links' / direction: "rte"
> - * Converting <LINK tags> to <A>-tags
> + * Converting <link tags> to <A>-tags
> *
> * @param string Content input
> * @return string Content output
> @@ -674,7 +674,7 @@
> function TS_links_rte($value) {
> $value = $this->TS_AtagToAbs($value);
>
> - // Split content by the TYPO3 pseudo tag "<LINK>":
> + // Split content by the TYPO3 pseudo tag "<link>":
> $blockSplit = $this->splitIntoBlock('link',$value,1);
> foreach($blockSplit as $k => $v) {
> $error = '';
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060329/6184ecee/attachment.htm
More information about the TYPO3-team-core
mailing list