Project:CSS Injector
Version:6.x-1.4
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

This patch uses ctools to validate and process the css. The main advantage is the filtering of the css by using ctools plugins. It's quite a big change and requires a patch to context also which I am posting after this issue.

THis patch also creates some new helper functions and moves the save function out of the form submit into a css_injector_save() function. This makes is much easier for others to manipulate and save the rule.

AttachmentSizeStatusTest resultOperations
css_injector-ctools.patch4.66 KBIgnoredNoneNone

Comments

#1

Here is the context issue that I will keep updated if this patch is committed: #837836: css injector ctools integration

#2

Let me add to indytechcook's explanation, because it took me a while to figure out the power of this patch. It really all comes down to this line towards the bottom of the patch:

<?php
  ctools_css_store
($css_id, $rule['css_text'], TRUE);
?>

ctools_css_store will disassemble the css, run it through some basic css validation, basically ensuring that the css properties and values that are being entered are from a sane list. Furthermore, we could actually do much more advanced filtering using the ctools css api, to provide a locked down filter for only certain properties and values.

nobody click here