Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I was looking at $matches[$user->name] = check_plain($user->name);
in user.module and was wondering, why the index is not check_plain'd and why the value is? This deserves better documentation.
Comment | File | Size | Author |
---|---|---|---|
drupal_to_js_better_doc.patch | 707 bytes | chx | |
Comments
Comment #1
chx CreditAttribution: chx commentedLet's not forget to credit kkaefer with helping me figuring out this.
Comment #2
Steven CreditAttribution: Steven commentedWhy are you removing this comment?
- * We use HTML-safe strings, i.e. with <, > and & escaped.
Comment #3
cYu CreditAttribution: cYu commentedI think drupal_to_js needs to have some mention of json. I've run across this doc before but still went on using json_encode because I didn't realize what was meant by "Javascript equivalent." At the very least I'd like to see...
Converts a PHP variable into its Javascript equivalent.
switched to
Converts a PHP variable into its JSON representation.
chx's original patch would also do the trick in addition to including some helpful security info.
Comment #4
dpearcefl CreditAttribution: dpearcefl commentedDoes this issue exist in current D6?
Comment #5
dpearcefl CreditAttribution: dpearcefl commentedComment #6
dpearcefl CreditAttribution: dpearcefl commentedThe patch was ignored so this is is "needs work".
The patch needs to be resubmitted with a proper filename and as "needs review".
http://drupal.org/node/1054616
[description]-[issue-number]-[comment-number].patch
Comment #7
chx CreditAttribution: chx commented