Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

How do I stop the editor from messing up my markup tags?

Quote Reply
How do I stop the editor from messing up my markup tags?
I'll try to explain this as clearly as I possibly can, if you have any questions please ask.

I have the following for a markup tag.

Tag: c()
HTML:
Code:
[<a href="http://gatherer.wizards.com/pages/card/details.aspx?name=%0%" onclick="NewWindow(this.href,'%1%','800','925','yes','center');return false" onfocus="this.blur()">%0%</a>]
End Html: (left blank)

I type in something like [c the blue dog]

when it's displayed on the page it's fine, it looks something like
Code:
[<a href="http://gatherer.wizards.com/pages/card/details.aspx?name=the blue dog" onclick="NewWindow(this.href,'%1%','800','925','yes','center');return false" onfocus="this.blur()">the blue dog</a>]
which is fine, because it's using javascript in the head of the page to make the link open up as a popup window 800 px wide by 925 px tall.


Now I go back into the editor and just add something else to the message, not touching the [c the blue dog] (which actually looks like [<a href="http://gatherer.wizards.com/pages/card/details.aspx?name=the blue dog">the blue dog</a>] inside of the editor.

Now I confirm the message changes and view the message. It now shows
Code:

[<a href="http://gatherer.wizards.com/pages/card/details.aspx?name=the blue dog" target="_blank">the blue dog</a>]


So, what's happening here apparently is that if I edit the message, it's taking the correct javascript href tag and tranposing it into a simple [url""] tag which messes up opening the link in a popup new window.

I hope that all made sence, now can someone offer me an alternative to this, or a solution to make it stop doing this?

I've tried removing the markup tag named url() but then after someone edits a message with one of the above links in them, it just shows [url]the blue dog[/url] for every link that was on an edited message page. So I've apparently got to leave the url() markup tag in the system.

All I want is for the darn thing to take the users input as [c user input] and output it to [user input] and link the user input to open in a new window that is 800px wide by 900px tall AND not mess up if the person has to edit their message.

It really shouldn't be this difficult. But what is the answer.

Last edited by:

Westin: May 25, 2009, 12:54 AM