#65 CR/LF in template definition causes runtime error

v1.7
closed-fixed
Patrick Wolf
5
2007-04-19
2007-04-19
Weta
No

If the Before Label template contains a carriage return then a '\n' will be included in the javascript that is generated by ApexLib_Browser.addLabelTemplate().

This causes a javascript runtime error ('unterminated string') in the browser.

e.g.
apexlib.field.addLabelTemplate(1,"<label for=\"#CURRENT_ITEM_NAME#\" tabindex=\"999\"> \n<a class=\"FIELDLABEL\" href=\"javascript:popupFieldHelp('#CURRENT_ITEM_ID#','12042695143635929824')\" tabindex=\"999\">","</a></label><img src=\"wwv_flow_file_mgr.get_file?p_security_group_id=504819247909335&p_fname=rqdnot.gif\">","<img width=\"16\" height=\"16\" border=\"0\" alt=\"Error\" src=\"/i/inline_error.gif\">","<br><span class=\"errTxt\">#ERROR_MESSAGE#</span>");

Note the '\n' after the tabindex attribute.

Discussion

  • Patrick Wolf
    Patrick Wolf
    2007-04-19

    Logged In: YES
    user_id=1449836
    Originator: NO

    Fixed in 1.7

     
  • Patrick Wolf
    Patrick Wolf
    2007-04-19

    • milestone: --> v1.7
    • status: open --> closed-fixed