Opened 12 years ago

Closed 10 years ago

#9137 closed Bug (fixed)

base-tag is not outputeed when head-tag has an attribute

Reported by: fujikawa.naoki Owned by:
Priority: Normal Milestone: CKEditor 4.4.5
Component: General Version: 3.1
Keywords: Cc:

Description

/_source/plugins/wysiwygarea/plugin.js

L.991

baseTag && ( data = data.replace( /<head>/, '$&' + baseTag ) );

I think that it is not

/<head>/

but

/<head[^/>]*?>/

here.

Attachments (3)

test.html (1.5 KB) - added by fujikawa.naoki 12 years ago.
test code html
screenshot.png (185.8 KB) - added by fujikawa.naoki 12 years ago.
WYSIWYG iframe source.
9137.patch (572 bytes) - added by fujikawa.naoki 12 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 12 years ago by fujikawa.naoki

Version: 3.6.4 (SVN - trunk)

comment:2 Changed 12 years ago by Wiktor Walc

The version number is the lowest version of CKEditor, where the error can be reproduced. Are you sure that this error wasn't present in CKEditor 3.6.3, 3.6, 3.0 and so on?

comment:3 Changed 12 years ago by Wiktor Walc

Keywords: base href removed
Version: 3.6.4 (SVN - trunk)

Please feel free to set the version number to the correct value when you confirm it.

comment:4 Changed 12 years ago by fujikawa.naoki

Version: 3.6.3

Sorry.

In 3.6.3. Probably from earlier

comment:5 Changed 12 years ago by Jakub Ś

Status: newpending

Hi,

Could you tell me how to reproduce this missing base tag in editor body? What is the scenario and does it happen in every browser?

I have tried pasting

<html>
	<head dir="ltr"> 
		<title></title>
		<base href="http://localhost" target="_blank" />
	</head>
	<body>
		<p>
			This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
	</body>
</html>

Switching to source and back but this works as expected.

comment:6 Changed 12 years ago by fujikawa.naoki

Is that of WYSIWYG iframe source.

Editor1 the image is displayed when you open the html attachment, editor2 will not be displayed. Because, to editor2 is base tag has not been output to the iframe html source

There are differences in editor2 attribute to the head tag is not from the editor1.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta content="text/html; charset=utf-8" http-equiv="content-type" />
	<script type="text/javascript" src="http://ckeditor.com/apps/ckeditor/3.6.3/ckeditor.js"></script>
</head>
<body>
			<label for="editor1">
                <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;html&gt;
                    &lt;head&gt;
                    &lt;body&gt;&lt;img src=&quot;screenshot.png&quot;&gt;&lt;/body&gt;
                    &lt;/head&gt;
                    &lt;/html&gt;
                </textarea>
            <label for="editor2">
            <textarea cols="80" id="editor2" name="editor2" rows="10">
                &lt;html&gt;
                &lt;head dir=&quot;ltr&quot;&gt;
                &lt;body&gt;&lt;img src=&quot;screenshot.png&quot;&gt;&lt;/body&gt;
                &lt;/head&gt;
                &lt;/html&gt;
            </textarea>
            <script type="text/javascript">
			//<![CDATA[
				CKEDITOR.replace( 'editor1',
					{
						fullPage : true,
                        baseHref : 'http://a.cksource.com/c/1/inc/img/'         
					});
				CKEDITOR.replace( 'editor2',
                    {
                        fullPage : true,
                        baseHref : 'http://a.cksource.com/c/1/inc/img/'
                    });
			//]]>
			</script>
</body>
</html>

Could you confirm? Thank you.

Changed 12 years ago by fujikawa.naoki

Attachment: test.html added

test code html

Changed 12 years ago by fujikawa.naoki

Attachment: screenshot.png added

WYSIWYG iframe source.

Changed 12 years ago by fujikawa.naoki

Attachment: 9137.patch added

comment:7 Changed 12 years ago by Jakub Ś

Status: pendingconfirmed
Version: 3.6.33.1

@fujikawa.naoki thank you for the file it shows the problem clearly. In editor two there is no image and source for second editor shows no base tag.

Issue has been reproducible from CKEditor 3.1 in all browsers.

comment:8 Changed 12 years ago by fujikawa.naoki

Thank you for the confirmation. Does it solve for the next release?

comment:9 Changed 11 years ago by Randall Severy

I have just run into this same problem when editing a web page that contained the following as the head tag:

<head profile="http://gmpg.org/xfn/11">

The problem still persisted even after upgrading to version 4.0.1, so it apparently has not yet been fixed. Any ETA on a fix for this issue?

comment:10 Changed 10 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.4.5
Resolution: fixed
Status: confirmedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy