Changeset 1525
- Timestamp:
- 08/06/06 13:23:04 (2 years ago)
- Location:
- trunk/gregarius
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/.htaccess
r1253 r1525 36 36 #tag view 37 37 RewriteRule ^tags?\/?$ tags.php?alltags [L,QSA] 38 RewriteRule ^tag\/( [a-zA-Z0-9_\.\+]+)$ tags.php?tag=$1 [L,QSA]39 RewriteRule ^tag\/( [a-zA-Z0-9_\.\+]+)\/rss\/?$ tags.php?tag=$1&rss [L,QSA]38 RewriteRule ^tag\/(.+)$ tags.php?tag=$1 [L,QSA] 39 RewriteRule ^tag\/(.+)\/rss\/?$ tags.php?tag=$1&rss [L,QSA] 40 40 41 41 #state view -
trunk/gregarius/ajax.php
r1493 r1525 196 196 197 197 function submit_tag_cb(ret) { 198 data= ret.replace(/[^a-zA-Z0-9\ _\.,]/gi,"").split(','); 198 data= ret.split(','); 199 //replace(/[^a-zA-Z0-9\ _\.,]/gi,"") 199 200 id=data[0]; 200 201 tags=data[1]; … … 218 219 // the tag container 219 220 var tc=document.getElementById("t"+id); 220 var tags = tc.innerHTML.replace(/<\/?a[^>]*>(\ $)?/gi,"").replace(<?php echo ALLOWED_TAGS_REGEXP ?>gi,""); 221 var tags = tc.innerHTML.replace(/<\/?a[^>]*>(\ $)?/gi,""); 222 //.replace(<?php echo ALLOWED_TAGS_REGEXP ?>gi,""); 221 223 // submit link 222 224 toggle.innerHTML="<?php echo LBL_TAG_SUBMIT ?>"; -
trunk/gregarius/constants.php
r1502 r1525 164 164 // it is used to filter out everything but the allowed tag 165 165 // characters, plus a whitespace 166 define('ALLOWED_TAGS_REGEXP', '/ [^a-zA-Z0-9\ _\.]/');166 define('ALLOWED_TAGS_REGEXP', '//'); 167 167 168 168 // Sanitizer constants -
trunk/gregarius/util.php
r1516 r1525 974 974 // moved from ajax.php 975 975 function __exp__submitTag($id,$tags,$type = "'item'") { 976 $ftags = preg_replace(ALLOWED_TAGS_REGEXP,'', trim($tags));976 $ftags = utf8_encode( preg_replace(ALLOWED_TAGS_REGEXP,'', trim($tags))); 977 977 $tarr = array_slice(explode(" ",$ftags),0,MAX_TAGS_PER_ITEM); 978 978 $ftags = implode(" ",__priv__updateTags($id,$tarr,$type));
