Make WordPress Core

Changeset 3276


Ignore:
Timestamp:
12/07/2005 12:36:07 AM (18 years ago)
Author:
ryan
Message:

Remove calls to html_entity_decode(). fixes #2029

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r3269 r3276  
    242242// Get an existing post and format it for editing.
    243243function get_post_to_edit($id) {
     244    global $richedit;
     245    $richedit = ( 'true' == get_user_option('rich_editing') ) ? true : false;
     246
    244247    $post = get_post($id);
    245248
    246     $post->post_content = format_to_edit($post->post_content);
     249    $post->post_content = format_to_edit($post->post_content, $richedit);
    247250    $post->post_content = apply_filters('content_edit_pre', $post->post_content);
    248251
     
    300303
    301304function get_comment_to_edit($id) {
     305    global $richedit;
     306    $richedit = ( 'true' == get_user_option('rich_editing') ) ? true : false;
     307
    302308    $comment = get_comment($id);
    303309
    304     $comment->comment_content = format_to_edit($comment->comment_content);
     310    $comment->comment_content = format_to_edit($comment->comment_content, $richedit);
    305311    $comment->comment_content = apply_filters('comment_edit_pre', $comment->comment_content);
    306312
  • trunk/wp-admin/import/blogger.php

    r3260 r3276  
    477477                            $commenthour = '00';
    478478                        $comment_date = "$commentyear-$commentmonth-$commentday $commenthour:$commentminute:$commentsecond";
    479                         $comment_author = addslashes(strip_tags(html_entity_decode($commentinfo[1])));
     479                        $comment_author = addslashes(strip_tags($commentinfo[1]));
    480480                        if ( strpos($commentinfo[1], 'a href') ) {
    481481                            $comment_author_parts = explode('"', htmlentities($commentinfo[1]));
  • trunk/wp-content/themes/default/functions.php

    r3006 r3276  
    2727function kubrick_upper_color() {
    2828    if ( strstr( kubrick_header_image_url(), 'header-img.php?' ) )
    29         return substr( kubrick_header_image(), 24, 6 );
     29        return substr( kubrick_header_image(), 21, 6 );
    3030    else
    3131        return '69aee7';
     
    3434function kubrick_lower_color() {
    3535    if ( strstr( kubrick_header_image_url(), 'header-img.php?' ) )
    36         return substr( kubrick_header_image(), 37, 6 );
     36        return substr( kubrick_header_image(), 34, 6 );
    3737    else
    3838        return '4180b6';
  • trunk/wp-content/themes/default/images/header-img.php

    r2910 r3276  
    1313    if ( isset($_GET[$var]) ) {
    1414        foreach ( $subvars as $index => $subvar ) {
    15             $$subvar = hexdec( substr( html_entity_decode($_GET[$var]), $index, 2) );
     15            $$subvar = hexdec( substr($_GET[$var], $index, 2) );
    1616            if ( $$subvar < 0 || $$subvar > 255 )
    1717                $default = true;
  • trunk/wp-includes/functions-formatting.php

    r3273 r3276  
    493493
    494494
    495 function format_to_edit($content) {
     495function format_to_edit($content, $richedit = false) {
    496496    $content = apply_filters('format_to_edit', $content);
    497     $content = htmlspecialchars($content);
     497    if (! $richedit )
     498        $content = htmlspecialchars($content);
    498499    return $content;
    499500}
     
    998999
    9991000    $output = $text;
    1000     $output = html_entity_decode($output); // undoes format_to_edit()
    10011001    $output = convert_chars($output);
    10021002    $output = wpautop($output);
  • trunk/wp-includes/js/tinymce/tiny_mce.js

    r3265 r3276  
    53085308            // Call custom cleanup code
    53095309            value = tinyMCE.storeAwayURLs(value);
    5310             value = tinyMCE._customCleanup(this, "insert_to_editor", value);
     5310            //value = tinyMCE._customCleanup(this, "insert_to_editor", value);
    53115311            tinyMCE._setHTML(doc, value);
    53125312            tinyMCE.setInnerHTML(doc.body, tinyMCE._cleanupHTML(this, doc, tinyMCE.settings, doc.body));
Note: See TracChangeset for help on using the changeset viewer.