Syntax rejection issues with HTML encoding in text editor

This forum is for all Flare issues not related to any of the other categories.

Syntax rejection issues with HTML encoding in text editor

Postby DoTheWriteThing on Thu Oct 11, 2018 2:58 am

Yesterday I tried insert a mailto link with a subject and body tag; it was rejected by the Flare syntax editor.

This was what I was trying to get past the syntax checker:

mailto:customerservice@madcapsoftware.com?Subject=Support%20Request&body=My%20Support%20Key

The error was: '=' Is an unexpected token, the expected token is ';'

By process of elimination I found that the issue was caused by the & character.

Any ideas?
DoTheWriteThing
Propeller Head
 
Posts: 25
Joined: Mon May 14, 2018 6:21 am

Re: Syntax rejection issues with HTML encoding in text edito

Postby ChoccieMuffin on Thu Oct 11, 2018 3:42 am

Where does your & appear? It's not in the bit of code you gave us.
Started as a newbie with Flare 6.1, now using Flare 2018.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Propellus Maximus
 
Posts: 1797
Joined: Wed Apr 14, 2010 8:01 am

Re: Syntax rejection issues with HTML encoding in text edito

Postby Dave Lee on Thu Oct 11, 2018 4:14 am

In XML editor (not text mode), insert a hyperlink to a Website (not Email), and copy/paste your mailto code - it'll work.

If you do enter the link manually in text mode, you need to replace the & with & - doing it the way above converts all that for you.

ChoccieMuffin wrote:Where does your & appear? It's not in the bit of code you gave us.


Specsavers? ;0)
Dave Lee
Master Propellus Maximus
 
Posts: 5306
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Syntax rejection issues with HTML encoding in text edito

Postby ChoccieMuffin on Thu Oct 11, 2018 5:54 am

Dave Lee wrote:In XML editor (not text mode), insert a hyperlink to a Website (not Email), and copy/paste your mailto code - it'll work.

If you do enter the link manually in text mode, you need to replace the & with & - doing it the way above converts all that for you.

ChoccieMuffin wrote:Where does your & appear? It's not in the bit of code you gave us.


Specsavers? ;0)


8)

D'oh!!! :mrgreen:
Started as a newbie with Flare 6.1, now using Flare 2018.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Propellus Maximus
 
Posts: 1797
Joined: Wed Apr 14, 2010 8:01 am

Re: Syntax rejection issues with HTML encoding in text edito

Postby ccahuber13 on Fri Oct 12, 2018 4:38 pm

Hello,

Falre's editor is XML which does not allow certain characters. XML syntax is VERY strict compared to regular HTML. There are special characters you must escape and is one of them.
XML escaped characters
Special character escaped form gets replaced by
Ampersand & &
Less-than &lt; <
Greater-than &gt; >
Quotes &quot; "

Replace any & with &amp

- WORK AROUND
If this solution does not work for you I've bypassed some of the editor issues by using an outside editor such as Visual Studio Code. In some cases you will need to publish first, then open the published page, make the edit with an outside editor. The downside to this is each time you publish it will be overwritten and must be changed. It's terrible but works in very small cases.

Alternatively, you can jQuery to append or insert inner HTML where you want the link. $("select element").append('<a href="www.google.com">MyLink</a>'); - This places a child element to the parent selector.
ccahuber13
Jr. Propeller Head
 
Posts: 2
Joined: Fri Oct 12, 2018 4:31 pm


Return to Flare's General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests