Try our conversational search powered by Generative AI!

URLEncoding in CMS

Vote:
 

Tried searching the forums is someone else has found this problem. Couldn't find anyone.

When you have propertyfields on a page that opens the VPP-folders. You can browse a file in the EPiServer-filetree and select a file. (clicking on the "...")

If you do select a file with spaces in it like "my file is here.txt" then the path in the propertyfield becomes something like "/upload/myfolder/my%20file%20is%20here.txt". This is all fine - the file works perfectly.

However, when you then try to edit the same field (clicking on the "..."), EPiServer tries to look up the same folder as the current file selected. But fails if the URL i encoded! If you manually change the value of %20 to " " (space) and then try again, EPiServer can open the correct folder. (in this case "/upload/myfolder/".

I have recreated this fault in a clean EPiServer Demosite. Version - CMS5 R2 and CMS5 R1.

Is this a bug? Or have i've missed some config to avoid encoding.

Best Regards Magnus

#34240
Oct 30, 2009 15:18
Vote:
 

Sounds like a bug. I havent run into it before thou,since I have a module that enforce no folders with space or non a-z charachteres

#34251
Oct 30, 2009 18:53
Vote:
 

Thats what I thought aswell. But I think you might be in trouble aswell, if your provider only check folders. This bug concerns filenames aswell.

Tried the whole thing in an old EPiServer 4.61 site. And there it works! Even with very wierd characters :)

#34304
Nov 02, 2009 13:48
Vote:
 

:) My provider also checks fil names so I'm in the clear

#34305
Nov 02, 2009 13:51
Vote:
 

Does not EpiServer CMS 5 R2 have support for filenames containing "&" characters?
In EPiServer CMS 4 these types of characters work very well.

#34995
Edited, Nov 23, 2009 16:46
Vote:
 

I don't see why it shouldn't work? Since the whole string is encoded in the installations of CMS5 R2 I'm using. I havn't tried it though.

#35013
Nov 24, 2009 10:35
Vote:
 

But images/files containing "&" character seems not be understood by the default html/text-edtitor that is used in EPiServer CMS 5 R2.
The default image editor do understand the file if it contains an "&" character in its filename but when inserting an image with the html/text-editor it encodes the file so that it gets "%26". The html/text-editor cannot even display a preview of the content when in design-mode. The image cannot be presented instead an red arrow is shown on a web page.
When removing the "&" character from the filename that image can be displayed on a web page in EPiServer.

#35015
Edited, Nov 24, 2009 11:30
Vote:
 

This sounds like yet another bug in the editor, somewhat alike the one I'm having. I have browsed the known buglist for R2 but found none of these bugs there. If you are a partner I suggest you might wanna open a supportcase - we're thinking of doing the same.

#35041
Nov 25, 2009 9:09
Vote:
 

yes I have opened a support case and this problem has been reported as a bug to the developement team.
Response from support engineer below...

Hi Robert,

I've been able to reproduce this and I have reported it as:

Bug #32299: Images cannot be displayed when containing characters such as e.g. "åäö&", "&" or "å&" in their filenames.

 Thanks for the feedback 

#35042
Nov 25, 2009 9:15
Vote:
 

In regards to my original question, I've found out the problem:

---Support Engineer---
there's a bug registered: #15729: StartPoint configuration doesn't work when uploading image in editor.

According to the bug description it should have been solved and implemented in the version you are using (R2 SP1), but it seems that it's not (I will post a comment about this in the bug description). I recommend you to install a clean installation of R2sp2 (5.2.375.236) to see if it work for you as well, and if it does you can upgrade your site to R2sp2.

---Support Engineer---

And I did an installation of SP2 and indeed the problem was solved in there. Just thought I'd update this post with info for someone else.

#35277
Dec 02, 2009 15:50
Vote:
 

As a matter of fact I have installed EPiServer CMS 5 R2 SP2 (v.5.2.375.236) and that is the version of EPiServer
having the problem with files (images, documents etc.) containing "&" characters.
The version I have upgraded from is EPiServer CMS 4.62. And that vesion do indeed support files containing
"&" characters in their filenames. So CMS 5 did Not get better support for files containing odd characters (such as "&").

#35293
Dec 03, 2009 8:02
Vote:
 

Hi!

I was investigating this bug last week and have come to the conclusion that it is indeed a problem that has appeared with the introduction of files through vpp:s in EPiServer CMs 5 since files through vpp:s will activate the asp.NET static file handler. Asp.NET default configuration blocks certain characters in the url, even though they are encoded, and the "&"-character (%26) is among them. It's possible to change this behaviour but this requires changes in the registry. See this page for more information on this:

http://dirk.net/2008/06/09/ampersand-the-request-url-in-iis7/

In EPiServer CMS 6 we have added the "&"-character to the illegalCharactersRegEx regular expression that is run to verify that folder and file names is valid for the vpp:s. This also needs to be changed if you want to let through the "&"-character when creating/changing file and folder names.

Regards
Linus Ekström
EPiServer Development Team

#35522
Dec 14, 2009 18:51
Vote:
 

Hi!

Does this solution also apply to w2k3/IIS6?
Thank you for your feedback.

#35524
Dec 15, 2009 7:47
Vote:
 

Hi!

Sorry for the delayed anwer, a cold kept me in bed last week. I have just tested this on a virtual machine with Windows Server R2 with IIS6.0 and it works fine there as well. Just make sure that you have the correct spelling and no extra blank spaces for the registry dwords. Also do an IIS-reset after changing the registry.

Merry Christmas
Linus Ekström and the EPiServer Dev-team elfs :)

#35748
Dec 22, 2009 15:16
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.