Opened 7 years ago

Closed 7 years ago

#8613 closed Bug (invalid)

showblocks confused by pathnames including spaces

Reported by: NicHolt Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

If the pathname for CKE includes e.g. a space, then paths in the cssTemplate may include %20, which the regex matches against %2. The result is that the images denoting the block type are missing. Fix is to use something other than %<numeral> as the paceholders in the cssTemplate.

Change History (7)

comment:1 Changed 7 years ago by Jakub Ś

Status: newpending

Just like in #8612

@NicHolt Could I ask you first for a reproducible TC (E.g. sample HTML file) so that we could see the problem on our own?

comment:2 Changed 7 years ago by Jakub Ś

@NicHolt any updates regarding this ticket?

comment:3 Changed 7 years ago by Jakub Ś

@NicHolt could I perhaps ask you to provide such template. The one you were using for your tests?

comment:4 Changed 7 years ago by NicHolt

Whilst developing various extensions, I am testing on my local PC.

So filenames are of the form X:/documents and settings/myprofile/my docments/filename ...

The URL encoded version of these local paths replaces spaces with %20.

As a result, the image paths in the CSS template are not recognised by the local OS.

Local file paths should either be universally converted to file:// protocol URLs, or they need to be reverted to local OS paths.

comment:5 Changed 7 years ago by Jakub Ś

Component: UI : DialogsUI : Context Menu

To reproduce:

  1. Place CKEditor locally E.g. C:/Users/me/Documents/my editor/ckeditor/
  2. In templates.js add the below code (please adjust paths)
    {
    	title: 'bb',
    	image: 'template3.gif',
    	description: 'bb',
    	html:
    		'<div style="width: 80%">' +
    		'<img alt="" src="C:\\Users\\me\\Documents\\my editor\\ckeditor\\_source\\plugins\\templates\\templates\\images\\template3.gif" style="width: 102px; height: 76px;" />'+
    		'<img alt="" src="file:///C:/Users/me/Documents/my editor/ckeditor/_source/plugins/templates/templates/images/template3.gif" style="width: 102px; height: 76px;" />'+						
    		'</div>'
    }
    
  3. Try to insert template 'bb'

Results:

  • First image path is not recognized by Safari, Opera and Firefox
  • Second image path is recognized by all browsers.
Version 0, edited 7 years ago by Jakub Ś (next)

comment:6 Changed 7 years ago by Jakub Ś

Component: UI : Context MenuGeneral

comment:7 Changed 7 years ago by Jakub Ś

Resolution: invalid
Status: pendingclosed
Version: 3.6.2

Taking into account that I have tried many different approaches and I have only managed to reproduce this problem with templates plugin as described in comment_5 I think that this is user creating template responsibility to use file://.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy