cancel
Showing results for 
Search instead for 
Did you mean: 

WYSIWYG Editor problem - external links

dotcombubble
Champ in-the-making
Champ in-the-making
Hi,
I thought this would be a relatively easy problem to solve but I can't find a solution anywhere.

I have a web form for creating a simple article. The user can enter text etc.
When I try to create a link for an external website (e.g. http://www.google.com) and then try to preview my content, the link on my previewed content page I get directed to is:
http://preview.admin.alfrescosample.www--sandbox.127-0-0-1.ip.alfrescodemo.net:8180/%22http://www.go...

Error:
type Status report

message /%22http://www.google.com%22

description The requested resource (/%22http://www.google.com%22) is not available.

The steps to create the link in the editor were:
1. Type in google.
2. Highlight "google" in the editor and click on the link button.
3. In the Insert/Edit Link popup I enter "http://www.google.com" in the Link URL field, accept default target and leave title blank and click ok.
4. Hit next in the web content wizard and when I click the "preview" eyeball I can see my created page no problem. Now when I click on the "google" link I then get the above mentioned link and error.

Any suggestions?
Thanks.
4 REPLIES 4

mikeh
Star Contributor
Star Contributor
Are you surrounding the link with "double quotes"? An encoded " is %22.

Mike

dotcombubble
Champ in-the-making
Champ in-the-making
Thanks for the reply Mike.

No, I am not adding quotes. I added the quotes in my description purely to indicate what I was typing. Just to be sure, what I type in the insert/edit link popup is: Http://www.google.com.

What I have found that is interesting is if I browse the sandbox website and then select "Create Web Content" from the "Create" menu and select content type as HTML in the dropdown in Step 1 and give the file a name like test.html, selecting the same web form, in step 2 I then create the link the same way as previously and the link on the rendered pagewhen previewed will be purely:
Http://www.google.com
Rather than the whole weird preview url I get if I used the web form directly, i.e.:
http://admin.alfrescosample.www--sandbox.127-0-0-1.ip.alfrescodemo.net:8180/%22http://www.google.com...

Any ideas?

Thanks again.

dotcombubble
Champ in-the-making
Champ in-the-making
Thanks again for the help Mike, I found and fixed the problem  Smiley Surprisedops:

When rendering the form, my xsl was using:
<xsl:variable name="body-text">
                        <xsl:value-of select="normalize-space(hg:body)" disable-output-escaping="yes"/>
                      </xsl:variable>
                      <xsl:value-of select="alf:encodeQuotes($body-text)" disable-output-escaping="yes"/>
                    

Changing this to:

                       <xsl:variable name="body-text">
                        <xsl:value-of select="hg:body" disable-output-escaping="yes"/>
                      </xsl:variable>
                      <xsl:value-of select="$body-text" disable-output-escaping="yes"/>

Fixed the problem and stopped prepending the virtual URL.

Hope this might help other people too.

mikeh
Star Contributor
Star Contributor
Thanks for the update - useful info.

Mike