Opened 6 years ago

Closed 3 years ago

#1624 closed defect (fixed)

IE 10: exception when calling str.replace in function htmlEncode

Reported by: guest Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version: trunk
Severity: blocker Keywords: IE10
Cc: meikw@…


The following line does not work because of exceptions in htmlEncode:

document.form.editorContent.value = xinha_editorseditor?.getEditorContent();

The exception message is:

Unable to get property 'replace' of undefined or null reference
XinhaCore?.js, line 2943

We are using Xinha 0.95.

line 2943 is within the following code snippet:

2942 Xinha.htmlEncode=function(str){
2943 if(typeof str.replace=="undefined"){
2944 str=str.toString();
2945 }

We tried to fix it ourselves and run in further exceptions in other parts of the code.

Is this a known issue?

Change History (2)

comment:1 Changed 6 years ago by guest

The line should be:

document.form.editorContent.value = xinha_editors[\'editor\'].getEditorContent();

without the backslashes

comment:2 Changed 3 years ago by gogo

  • Resolution set to fixed
  • Status changed from new to closed

The current trunk appears to include a fix for that

Xinha.htmlEncode = function(str)
  if (!str)
    return '';
  }  if ( typeof str.replace == 'undefined' )
    str = str.toString();

so I'd guess probably fixed

Note: See TracTickets for help on using tickets.