Skip to content

Commit

Permalink
sanitize_value no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Mar 8, 2023
1 parent 7f41262 commit b8f8eef
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/style-engine/class-wp-style-engine-css-declarations.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,4 @@ public function get_declarations_string( $should_prettify = false, $indent_count
protected function sanitize_property( $property ) {
return trim( sanitize_key( $property ) );
}

/**
* Sanitize values.
*
* @param string $value The CSS value.
*
* @return string The sanitized value.
*/
protected function sanitize_value( $value ) {
// Escape HTML.
$value = esc_html( $value );
// Fix quotes to account for URLs.
$value = str_replace( array( ''', ''', '"', '"', '"', ''' ), array( "'", "'", '"', '"', '"', "'" ), $value );
return trim( $value );
}
}

0 comments on commit b8f8eef

Please sign in to comment.