Index: trunk/extensions/ProofreadPage/proofread_index.js |
— | — | @@ -41,6 +41,8 @@ |
42 | 42 | str = str + '<tr><td>'+param_label+': </td>'; |
43 | 43 | |
44 | 44 | value = findparam(params,param_name); |
| 45 | + value = value.replace(/\{\{!\}\}/g,'|'); |
| 46 | + |
45 | 47 | if(m[2]) size=m[2]; else size="1"; |
46 | 48 | if(size=="1") { |
47 | 49 | str = str + '<td><input name="'+param_name+'" size=60 value="'+value+'"/></td></tr>'; |
— | — | @@ -78,8 +80,12 @@ |
79 | 81 | for(i=0;i<index_attributes.length;i++){ |
80 | 82 | m = index_attributes[i].split('|'); |
81 | 83 | param_name = m[0]; |
| 84 | + |
82 | 85 | value = form.elements[param_name].value; |
83 | | - value = value.replace('\n|','\n\\|'); |
| 86 | + value = value.replace(/\|/g,'{{!}}'); |
| 87 | + //not for links! |
| 88 | + value = value.replace(/\[\[(.*?)\{\{!\}\}(.*?)\]\]/g,'[[$1|$2]]'); |
| 89 | + |
84 | 90 | result = result + "\n|"+param_name+"="+value; |
85 | 91 | } |
86 | 92 | result = result + "\n}}"; |