Index: trunk/extensions/CreateAPage/js/CreateAPage.js |
— | — | @@ -60,9 +60,9 @@ |
61 | 61 | var category_text = document.getElementById( 'wpCategoryTextarea' ); |
62 | 62 | |
63 | 63 | if ( category_text.value === '' ) { |
64 | | - category_text.value += unescape( category ); |
| 64 | + category_text.value += decodeURIComponent( category ); |
65 | 65 | } else { |
66 | | - category_text.value += '|' + unescape( category ); |
| 66 | + category_text.value += '|' + decodeURIComponent( category ); |
67 | 67 | } |
68 | 68 | |
69 | 69 | var this_button = document.getElementById( 'cloud' + num ); |
— | — | @@ -95,9 +95,9 @@ |
96 | 96 | var category = category_input.value; |
97 | 97 | if ( category_input.value !== '' ) { |
98 | 98 | if ( category_text.value === '' ) { |
99 | | - category_text.value += unescape( category ); |
| 99 | + category_text.value += decodeURIComponent( category ); |
100 | 100 | } else { |
101 | | - category_text.value += '|' + unescape( category ); |
| 101 | + category_text.value += '|' + decodeURIComponent( category ); |
102 | 102 | } |
103 | 103 | category_input.value = ''; |
104 | 104 | var c_found = false; |
— | — | @@ -140,10 +140,10 @@ |
141 | 141 | |
142 | 142 | remove: function( category, num ) { // previously cloudRemove |
143 | 143 | var category_text = document.getElementById( 'wpCategoryTextarea' ); |
144 | | - var this_pos = category_text.value.indexOf( unescape( category ) ); |
| 144 | + var this_pos = category_text.value.indexOf( decodeURIComponent( category ) ); |
145 | 145 | if ( this_pos !== -1 ) { |
146 | 146 | category_text.value = category_text.value.substr( 0, this_pos - 1 ) + |
147 | | - category_text.value.substr( this_pos + unescape( category ).length ); |
| 147 | + category_text.value.substr( this_pos + decodeURIComponent( category ).length ); |
148 | 148 | } |
149 | 149 | var this_button = document.getElementById( 'cloud' + num ); |
150 | 150 | this_button.onclick = function() { |
— | — | @@ -618,7 +618,7 @@ |
619 | 619 | |
620 | 620 | onclickCategoryFn: function( cat, id ) { |
621 | 621 | return function() { |
622 | | - CreateAPageCategoryTagCloud.remove( escape( cat ), id ); |
| 622 | + CreateAPageCategoryTagCloud.remove( encodeURIComponent( cat ), id ); |
623 | 623 | return false; |
624 | 624 | }; |
625 | 625 | }, |