NetTalk Central

Author Topic: NT6.51 regression - Alert messages that contain an apostrophe are not displaying  (Read 4491 times)

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Hi Bruce,
Since NT6.51the pop-up message box does not appear if the text contains an apostrophe. Test by adding the following code for a field validation in a NetWebForm
Loc:invalid ='fieldname'
Loc:alert= 'Dossier de vérification invalide pour l''utilisateur'

I think the problem was caused by the fix in NT6.51 that was done to permit accented characters to appear correctly in the pop-up message box,  since loc:alert ='Let''s drink beer' does not work either.  There test with text containing both an apostrophe and accented characters.

Another regression bug that I feel is related.
If the title of a pop-up form (NetWebBrowse or NetWebFrom) has an apostrophe, the form does not appear. For an example, place a field on a NetWebForm that has a lookup button connected to a lookup browse which will allow the user to select values. In the field’s Lookup Settings, check the box for a Popup Lookup and in the Lookup Title enter:  'Sévérité d''observation'
When compiled,  the look up button appears, but does not work. Change the Lookup Title to value without an apostrophe, and the pop-up browse will appear when the button is clicked.

I have added an example program to show these errors in my "Runtime Language Translation Issues." post.

Rob
« Last Edit: November 21, 2012, 09:09:00 PM by Rob Kolanko »

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Hello Bruce,
I hope that work is being done on this issue. If the problem is not resolved by next release, please revert the "Fix: Popup method could over-encode alert messages." or any other change done in 6.51 the prevents the pop-ups from appearing when they contain an apostrophe in the title or in the message when a alert message. With regards to runtime translations, I was better without this fix from 6.51.

Thanks,
Rob

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Moving back to the earlier code is straight-forward.

open netweb.clw
search for ntAlert
it will occur on two lines.

add a self.escape call around the self._utfjs call. ie
the first line becomes
return(self.Script('ntAlert(''' & self.escape(self._utfjs(self.GetValue('Alert'))) & ''');',p_Send))
and the second becomes
return(self.Script('ntAlert(''' & self.escape(self._utfjs(p_text)) & ''');',p_Send))

Cheers
Bruce


Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Hi Bruce,
I guess you were not sure of the change as well, because the original lines of code were just commented out. I just commented the new line and uncommented the original line.  Anyway this change is not the solution to the accented character problem in messages and apostrophe in titles of pop-ups. My second example program in "Runtime Language Translation Issues." post still provides examples of the current problems.
Rob.