From 1dc4e6845a753f1527090250c9eb63a6fe7fd929 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 30 Apr 2009 01:33:42 +0000 Subject: [PATCH] Merged r75690 from sapphire/trunk git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@75700 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/HtmlEditorField.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/forms/HtmlEditorField.php b/forms/HtmlEditorField.php index 89631ef58..b03622ad9 100755 --- a/forms/HtmlEditorField.php +++ b/forms/HtmlEditorField.php @@ -245,7 +245,12 @@ function HtmlEditorField_dataValue_processImage($parts) { // Insert an empty alt tag if there isn't one if(strpos($result, "alt=") === false) { - $result = substr_replace($result, ' alt="" />', -2); + $result = substr_replace($result, ' alt="" />', -3); + } + + // Insert an empty title tag if there isn't one (IE shows the alt as title if no title tag) + if(strpos($result, "title=") === false) { + $result = substr_replace($result, ' title="" />', -3); } return $result; @@ -423,7 +428,8 @@ class HtmlEditorField_Toolbar extends RequestHandler { ), new TextField('getimagesSearch', _t('HtmlEditorField.SEARCHFILENAME', 'Search by file name')), new ThumbnailStripField('Image', 'FolderID', 'getimages'), - new TextField('AltText', _t('HtmlEditorField.ALTTEXT', 'Description'), '', 80), + new TextField('AltText', _t('HtmlEditorField.IMAGEALTTEXT', 'Alternative text'), '', 80), + new TextField('ImageTitle', _t('HtmlEditorField.IMAGETITLE', 'Title text')), new CheckboxField('Caption', _t('HtmlEditorField.CAPTION', 'Include as Caption')), new DropdownField( 'CSSClass',