WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #15454, comment 22


Ignore:
Timestamp:
04/05/2014 07:54:24 AM (7 years ago)
Author:
Denis-de-Bernardy
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15454, comment 22

    v1 v2  
    1 @nacin or @ryan or @markjaquith: Any odds you could chime in when you've a moment, to explain when and why `esc_textarea()` is supposed to be used rather than `esc_html()`? The codex is rather unclear on when to use it, it doesn't seem to be worrying about the charset, and this ticket and others related to it give the impression that the only thing we introduced with `esc_textarea()` were bugs and regressions.
     1@nacin or @ryan or @markjaquith: Any odds you could chime in when you've a moment, to explain when and why `esc_textarea()` is supposed to be used rather than `esc_html()`? The codex is rather unclear on when to use it, and this ticket and others related to it give the impression that the only thing we introduced with `esc_textarea()` were bugs and regressions.
     2
     3The main difference I'm seeing between the two are:
     4
     5- `esc_textarea()` will blissfully spit out invalid utf8 chars, whereas `esc_html()` will strip them
     6- `esc_textarea()` will double-encode html entities, whereas `esc_html()` will not