Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX] Sanitization cleanup #15

Open
jenlampton opened this issue Mar 14, 2017 · 0 comments
Open

[DX] Sanitization cleanup #15

jenlampton opened this issue Mar 14, 2017 · 0 comments

Comments

@jenlampton
Copy link
Member

In several places an object has its parts sanitized and is then passed to the theme layer. This creates a confusing and possibly dangerous scenario where we are training front-end developers that it's okay to print directly from these objects. It would be better to create an array of data values for use in the theme, where one of those values can be the full, unsanitized object.

For example, a vocabulary could look like this:

$vocabulary = ...
$vocab_info = array(
  'name' => check_plain($vocabulary->name),
  'description' => check_plain($vocabulary->description),
  'original => $vocabulary,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant