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.

CommentFileSizeAuthor
drupal_to_js_better_doc.patch707 byteschx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Let's not forget to credit kkaefer with helping me figuring out this.

Steven’s picture

Status: Reviewed & tested by the community » Needs work

Why are you removing this comment?

- * We use HTML-safe strings, i.e. with <, > and & escaped.

cYu’s picture

I 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.

dpearcefl’s picture

Status: Needs work » Postponed (maintainer needs more info)

Does this issue exist in current D6?

dpearcefl’s picture

Status: Postponed (maintainer needs more info) » Needs work
dpearcefl’s picture

The 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

chx’s picture

Assigned: chx » Unassigned
Issue summary: View changes

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.