I have a lot of links of type {cms_selflink href='page' anchorlink='anchor'} on my page. Just the {cms_selflink href='page'} seems to work fine, but if add the anchorlink, the WYSIWYG editors put %20 in the spaces. Then the whole page gives out an error.
I would just use html, but my client wants to use some type of WYSIWYG. First I tried the MicroTiny that came with the fresh install. with that, if I edit the link in WYSIWYG, the %20's keep being added. Then I installed TinyMCE, which I would prefer over MicroTiny, but it's even worse: if I edit something (_not_ the links) on the page and save, all the links magically change.
Any suggestions?
WYSIWYG editor add %20 to links
Re: WYSIWYG editor add %20 to links
The %20 is because there are spaces in the URL. I've seen this happen most often when installed on a Windows based server (WAMP) and especially if the client needs to link to images or documents located on the server.
I did have a client with the above situation (WAMP and trying to link to files on their local server with spaces in the name) that was resolved by changing the character encoding.
I did have a client with the above situation (WAMP and trying to link to files on their local server with spaces in the name) that was resolved by changing the character encoding.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo
--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Re: WYSIWYG editor add %20 to links
I think I got misunderstood. The %20's are not added serverside. The wysiwyg editor adds them, on the client browser side.JohnnyB wrote:The %20 is because there are spaces in the URL. I've seen this happen most often when installed on a Windows based server (WAMP) and especially if the client needs to link to images or documents located on the server.
I did have a client with the above situation (WAMP and trying to link to files on their local server with spaces in the name) that was resolved by changing the character encoding.
The thing that's happening is, if I select a part of text, then use a tool to make an in-site-link, the result looks like this:
{cms_selflink href='page'}
And that works just fine! But I have those anchors, that I want to use. So, with the editor, I edit the link, to add the anchor point, like so:
{cms_selflink href='page' anchorlink='anchor'}
But after editing, it has changed to:
{cms_selflink%20href='page'%20anchorlink='anchor'}
CMSMS doesn't like that. The whole page goes down with an error. If I use tinyMCE for editing, I won't even have to edit any links - the %20's magically appear to all the links with anchorlink defined on the page.
The link itself, the link that get's generated by that cms_selflink code, does not contain any spaces. I am not trying to point to any files or directories that have spaces in their names.
Re: WYSIWYG editor add %20 to links
{cms_selflink href=} suggests your building the links yourself:
have a look at Extensions -. TinyMCY --> Advanced (Tab):
From that point of view it seems okay for tinyMCE to convert spaces to %20. Apparently TinyMCE does not recognize the smarty tag.<a href="{cms_selflink href="pagealias"}"> link text </a>
have a look at Extensions -. TinyMCY --> Advanced (Tab):
Avoid link conversion:
Turns TinyMCE's builtin link conversion logic off. Makes {smarty}-usage in urls possible.
Re: WYSIWYG editor add %20 to links
When editing CMSMS tags - anything between the curly brackets {} - I almost always disable the WYWIWYG editor, which is also called, "HTML View", because the editor can corrupt tags by doing things like that.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo
--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--