Changeset 1087 for trunk/modules/Dialogs


Ignore:
Timestamp:
10/13/08 16:48:22 (11 years ago)
Author:
nicholasbs
Message:

Fixes #1296 (words in brackets replaced with dialog IDs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/Dialogs/XinhaDialog.js

    r1084 r1087  
    10501050    }; 
    10511051  } 
    1052    
    1053   html = html.replace(/\[([a-z0-9_]+)\]/ig, 
    1054     function(fullString, id) 
    1055     { 
    1056       return dialog.createId(id); 
     1052 
     1053  // looking for strings of the form name='[foo]' or id="[bar]" 
     1054  html = html.replace(/((?:name)|(?:id))=(['"])\[([a-z0-9_]+)\]\2/ig, 
     1055    function(fullString, type, quote, id) 
     1056    { 
     1057      return type + "=" + quote + dialog.createId(id) + quote; 
    10571058    } 
    10581059    ).replace(/<l10n>(.*?)<\/l10n>/ig, 
Note: See TracChangeset for help on using the changeset viewer.