Special Escape characters

I am sure my problem has to do with special escape char. But would like clarification.

On a screen I have an editable table. Then I have a button that converts this table to HTML and sends it to the required recipients. I have noticed that when I use /, the cell from the table that contains this is not translated and sent. So the cell that contains this character is not sent and it does not matter which cell it is.

I did some research and found the following were listed as special escape characters: >, <, , and &. However I thought that by using the opposing slash that it might work. But all of these characters produced the same results. If I use an underscore or hyphen it works ok.

So my two questions are:

  1. Is this all the special escape characters that one has to work around?

  2. If I want to send the data as is from the table component how do I get it to ignore the / as an escape character?

Thanks and have a great day.

Forward slash isn’t an escape character, at least not it HTML. It does have special meaning when following a < character (to end a tag). I don’t really know what you mean when you say that the cell isn’t “translated and sent”.

Ok attached is a screen shot of the HTML translated screen that is sent to purchasings email address. A copy is also sent to mine so that I know what problems are occuring.

As you can see we use the TABLE component to enter in the data. I was there when the mechanic had placed the order and I watched to make sure he had done so correctly.

In the place of ITEM#, he entered: CYR 7/8

This is the bearing number. However it did not send this information but it did send everything else as you can see.

We went back in and tried the following: CYR 7\8

Again it did not send this cell.

However when we entered in: CYR 7-8

Then it sent it. SO I am wondering if both forward and back slashes are similar when working with your software? I did find on the one site the list of special escape characters mentioned earlier in this post but it only mentioned the one.

Hope this helps.


I’m not sure that this has anything to do with our software. It looks like this HTML is generated by a script that you’ve written, yes? Have you looked at the source of the html? Is the cell contents there, just not being shown? If not, you’ll need to troubleshoot your script.

As I mentioned the basic portion of the information is from a TABLE COMPONENT. Then I have a button and under this button I have the following script:

[code]table = event.source.parent.getComponent(“Table”)

subject="%s is requestion parts from %s"%(user,ven)

heading=“

Req. for Parts. Location:%s Serial:%s Date:%s
Vendor: %s

”%(mn,sn,dt,ven)

level = “

For: %s

”%(what)

label=table.getDataAsHTML(“Testing”,1000)

tail=“

Date Req:%s Charge To:%s
Request by: %s

”%(req,chrg,used)

body=heading+level+label+tail

recipients = [“electrician@thompsonmailing.com”,“duren@thompsonmailing.com”,“jwillhoit@thompsonmailing.com”]

fpmi.net.sendEmail(“djtemail”,"production@thompsonmailing.com",subject,body,1,recipients)[/code]

The one line label=table.getDataAsHTML(“Testing”,1000), this is the one that takes the data from the table component and translates it into HTML for emailing. Or at least that is the way it makes it sound from the help file. When I type in either / or \ in the item number, although it is a text field, it will not send that infromation over. And just to see what is going on I also have it directly writing the seen data without translation to HTML down to a SQL table and it does not see it there either. So that makes it sound as though both slashes are in deed part of the special escape characters.

Neither forward nor backslash are special characters in HTML. I just tested the table, and it passes forward and backslashes through to the HTML generated by getDataAsHTML() just fine.

You said you were writing the data down to the database and the slashes were not there either - how was this writing occuring?

That said, your HTML is malformed in the extreme. You cannot have multiple or start tags in an HTML document, and you’ve mixed up the order of your end tags, although that doesn’t really matter since they shouldn’t be there anyways…

You need to do the trouble shooting more methodically. Where exactly are the slashes getting “lost”. Examine the return value of table.getDataAsHTML() - is the data there? Also, how is this table’s data property bound, if at all? What scripts run on table cell edit event, if any?

So you are saying that my HTML code is malformed in the extreme. How would you recommend fixing it? Would you put only one and on the headings line then put and on the tail end line? Would that work? Doesnt the table also put in its own of these tags?

Just curious how the pros would accomplish this. And the thing is that while looking for HTML code I came across this web page where they had all those extra body and html tags. So I thought that was the way to do it.

[quote=“Carl.Gould”]Neither forward nor backslash are special characters in HTML. I just tested the table, and it passes forward and backslashes through to the HTML generated by getDataAsHTML() just fine.

You said you were writing the data down to the database and the slashes were not there either - how was this writing occuring?

That said, your HTML is malformed in the extreme. You cannot have multiple or start tags in an HTML document, and you’ve mixed up the order of your end tags, although that doesn’t really matter since they shouldn’t be there anyways…

You need to do the trouble shooting more methodically. Where exactly are the slashes getting “lost”. Examine the return value of table.getDataAsHTML() - is the data there? Also, how is this table’s data property bound, if at all? What scripts run on table cell edit event, if any?[/quote]

Here is a nice intro to basic HTML: w3.org/MarkUp/Guide/

The table’s getDataAsHTML function gives you a full HTML page. Since you want to add things to the beginning and end, you’ll need to trim everything before and including the tag and after and including the tag. Then you’ll need to add those back in yourself. Like so:

[code]table = event.source.parent.getComponent(“Table”)

subject="%s is requestion parts from %s"%(user,ven)

heading=“

Req. for Parts. Location:%s Serial:%s Date:%s
Vendor: %s

”%(mn,sn,dt,ven)

level = “

For: %s

”%(what)

label=table.getDataAsHTML(“Testing”,1000)
bodyStart = label.find("")
trimmed = label[bodyStart+6:-14]
#Workaround for missing tag in FPMI PRE 3.3.2
trimmed += “”

tail=“

Date Req:%s Charge To:%s
Request by: %s

”%(req,chrg,used)

body=heading+level+trimmed+tail

recipients = [“electrician@thompsonmailing.com”,“duren@thompsonmailing.com”,“jwillhoit@thompsonmailing.com”]

fpmi.net.sendEmail(“djtemail”,"production@thompsonmailing.com",subject,body,1,recipients)[/code]

Now, whether or not this has anything to do with your slashes issue, I’m not sure…