[Typo3-dev] tslib_content::getAltParam()

Robert Lemke rl at robertlemke.de
Wed Mar 24 12:35:58 CET 2004


Hi Martin et al,

On Mon, 2004-03-22 at 14:42, Martin T. Kutschker wrote:
> It's a good thing that Typo3 support also the title attribute (if only
> for images).
> 
> But I'm not happy with two issues. First, I'm unsure about the benefits 
> of using strip_tags() on the content since it's protected by 
> htmlspecialchars() anyway. It's not necessary and may lead to unexpected 
> results.

Could you give an example of a situation when strip_tags would cause any
problems? I didn't put it in there for security reasons but for the
visual representation and fulfilling the standards. The alt="" and
title"" parameters are meant to only contain text.

> Second, I'm not convinced that the use-alt-for-title-feature is doing 
> any good. It may be convenient for a short period while sites make a 
> transition into proper using of title-attributes, but not more. IMHO it 
> would be more sensible to use the alt-text as title-text and have an 
> empty alt-tag. This saves bandwith and old-style alt-texts should in 
> 99.9% really be title-texts.

After following this discussion and re-reading the suggestions of the
W3C I decided to leave it as it is now.

If you want to provide an empty alt parameter and use the title
parameter instead, you can easily do that by using the appropriate
stdWrap property.

If you'd like to specify a title parameter independently from the alt
parameter in your text w/image content element, I suggest to get in
touch with Volker Hielscher, the author of the alttext for images
extension. If he didn't do already, he could easily provide a second
text area for specifying the title parameter.

-- 
robert

"They placed me on this earth without a manual. 
 And I dare to say, I’m doing just fine without ;)"






More information about the TYPO3-dev mailing list