Skip to content

Commit

Permalink
Fixed #9451: Tags with single quotes and double quotes are escaped mo…
Browse files Browse the repository at this point in the history
…re than once.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5456 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Jul 29, 2008
1 parent d4325a7 commit 7d227b1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/tag_api.php
Expand Up @@ -287,8 +287,6 @@ function tag_create( $p_name, $p_user_id=null, $p_description='' ) {
user_ensure_exists( $p_user_id );
}

$c_name = trim( db_prepare_string( $p_name ) );
$c_description = db_prepare_string( $p_description );
$c_user_id = db_prepare_int( $p_user_id );
$c_date_created = db_now();

Expand All @@ -309,7 +307,7 @@ function tag_create( $p_name, $p_user_id=null, $p_description='' ) {
" . db_param() . "
)";

db_query_bound( $query, Array( $c_user_id, $c_name, $c_description, $c_date_created, $c_date_created ) );
db_query_bound( $query, Array( $c_user_id, trim( $p_name ), trim( $p_description ), $c_date_created, $c_date_created ) );
return db_insert_id( $t_tag_table );
}

Expand Down Expand Up @@ -614,7 +612,7 @@ function tag_display_link( $p_tag_row, $p_bug_id=0 ) {
} else {
$t_detach = config_get( 'tag_detach_threshold' );
}

$t_name = string_display_line( $p_tag_row['name'] );
$t_description = string_display_line( $p_tag_row['description'] );

Expand Down

0 comments on commit 7d227b1

Please sign in to comment.