CCALI / a2jauthor

CALI A2JAuthor document automation authoring and viewing platform
https://www.a2jauthor.org
Other
4 stars 1 forks source link

&nbsp in editor kills macros #130

Open normon66 opened 3 years ago

normon66 commented 3 years ago

Sometimes, an &nbsp can get 'stuck' in the editor instead of a normal space, thus killing macros.

In this example, I was testing the AGE function on some dates. I entered the first two lines to test date 1:

Date 1: %%[Date 1 DA]%%, %%DATE([Date 1 DA])%%
Age: %%AGE([Date 1 DA])%%, %%AGE(DATE([Date 1 DA]))%%

When I copy and pasted those to test [Date 2 DA], an &nbsp copied over instead of a space. I even tried copying everything to Notepad, then copying from there and pasting back into A2J, but the problem persisted.

Interview is attached - error on page "0-Info"

error with nbsp.zip

image

image

JessicaFrank commented 3 years ago

@normon66 how did you create [Date 1 DA] the first times you used it? Just typed it in?

I'm having a hard time replicating this. Can you replicate it? I tried typing in a var name, then copying it. No nbsp. Tried copying and pasting that var name = no nbsp. I played around with different copy and paste and typed options and couldn't replicate.

normon66 commented 3 years ago

@JessicaFrank - I thought I had just typed the first lines in, but if that was the case, we'd be seeing this a lot more often, so I must have copied the variable names from the Variables tab or perhaps from a Variable Name edit box (although that in itself wouldn't explain the &nbsp markers that appear between the

aragraph tags).

My thinking in creating this was more if there was a simple way with that text area widget to just replace any &nbsp's that creep in with a regular space.