PDA

View Full Version : Electos 3.- Beta - Runtme eror. Illegal character.



BO Lincoln
2-Dec-2006, 02:04 PM
Dec 2, 2006
Electos 3.0 Beta - V3.0.8.120

I am converting a web site to Electos.

The existing site is a mix of HTML and ASP pages held together by an HTML
menu. For the most part, I have been creating new content pages in Electos
with "Add Page", using the "Simple Page" document structure and the default
normal.asp template. Once in the FCKeditor I switch to "Source" view. I open
the source of the existing HTML page in Notepad and copy everything between
(but not including) the body tags. Then I paste the HTML in the FSCK editor
and switch out of source view. Save and voila! With minor tweaking the page
is ready to be published.

Hit a snag on one page where Electos Studio/FCKeditor is complaining about
an "illegal character" in the pasted HTML when swapping out of source view
to display view.

"A runtime error has occurred. Do you wish to debug?"
Line: 0
Error: Invalid character


Tracked the illegal character down by pasting the HTML into a new document
in Multiedit and looking for "funky characters". The "illegal character"
turned out to be a "backtick" (decimal 146). The "backtick was used by a
previous developer instead of a single quote in a confirm function call from
an "onclick" inside an anchor tag.

<a onclick="return confirm('Ready to proceed?')" target="mainFrame"
href="emplview.htm">Employee of the month</a>


While the content creator has some responsibility for adhering to standards
regarding valid characters, shouldn't Electos filter out those characters
that are so "illegal" that they cause a runtime error?


-BO Lincoln

BO Lincoln
2-Dec-2006, 02:16 PM
Addendum to this issue.

I type over the "illegal character" and replace it with a normal single
quote and FCKeditor will NOT save my change. I can edit other content on the
page but not the "illegal character"

-BO Lincoln

BO Lincoln
2-Dec-2006, 02:36 PM
Addendum to the Addendum:

I made sure that the HTML to be pasted had normal single quotes and not
"backticks' (decimal 146).
I pasted the HTML in the source view of Electos Studio FCKEditor.
I can swap back and forth between source and display mode without any
complaints about "illegal character" The "characters in question" are still
single quotes at this point.
I click [save and exit]
I click [edit] to reload the page in the FCKeditor.
Now I get the warning about "illegal character"
Switching to source view, I see that the single quotes have been converted
to "backticks".
Looks to me like either FCKeditor or Electos is converting the single quotes
to backticks

-BO Lincoln

Edwin van der Velden
2-Dec-2006, 08:02 PM
Strange enough I haven't been able to reproduce this in 3.0.8 but I have
reproduced it in my latest version. Normally the fckeditor would convert
backticks into &rsquote; but because it is between < > tags it does not do
that (which is a good thing I guess since javascript wouldn't work if it did
convert it).

The value gets stored and returned as a single quote (34) so the conversion
is done by either the fckeditor or the browser. Firefox (2.0) seems to have
no problems with it. Guess it's IE being picky and only supports single
quotes for scripts.

Noted as issue to be fixed.

Edwin van der Velden
Data Access Europe


"David W. Lincoln" <dwl@lincolnsystems.us> wrote in message
news:ycOd9SkFHHA.3896@dacmail.dataaccess.com...
> Dec 2, 2006
> Electos 3.0 Beta - V3.0.8.120
>
> I am converting a web site to Electos.
>
> The existing site is a mix of HTML and ASP pages held together by an HTML
> menu. For the most part, I have been creating new content pages in Electos
> with "Add Page", using the "Simple Page" document structure and the
> default normal.asp template. Once in the FCKeditor I switch to "Source"
> view. I open the source of the existing HTML page in Notepad and copy
> everything between (but not including) the body tags. Then I paste the
> HTML in the FSCK editor and switch out of source view. Save and voila!
> With minor tweaking the page is ready to be published.
>
> Hit a snag on one page where Electos Studio/FCKeditor is complaining about
> an "illegal character" in the pasted HTML when swapping out of source view
> to display view.
>
> "A runtime error has occurred. Do you wish to debug?"
> Line: 0
> Error: Invalid character
>
>
> Tracked the illegal character down by pasting the HTML into a new document
> in Multiedit and looking for "funky characters". The "illegal character"
> turned out to be a "backtick" (decimal 146). The "backtick was used by a
> previous developer instead of a single quote in a confirm function call
> from an "onclick" inside an anchor tag.
>
> <a onclick="return confirm('Ready to proceed?')" target="mainFrame"
> href="emplview.htm">Employee of the month</a>
>
>
> While the content creator has some responsibility for adhering to
> standards regarding valid characters, shouldn't Electos filter out those
> characters that are so "illegal" that they cause a runtime error?
>
>
> -BO Lincoln
>
>
>

BO Lincoln
3-Dec-2006, 08:39 AM
Acknowledged.

Thanks,
-BO Lincoln