function _jquery_ui_filter_parse_tag_attributes in jQuery UI filter 7
Same name and namespace in other branches
- 6 jquery_ui_filter.module \_jquery_ui_filter_parse_tag_attributes()
Parses a tag's attributes into an associated array.
3 calls to _jquery_ui_filter_parse_tag_attributes()
- _jquery_ui_filter_dialog_prepare_replacer in dialog/
jquery_ui_filter_dialog.module - Jquery UI filter dialog prepare replacer.
- _jquery_ui_filter_dialog_process_replacer in dialog/
jquery_ui_filter_dialog.module - Jquery UI filter dialog process replacer: Add jQuery UI dialog class to links.
- _jquery_ui_filter_process_replacer in ./
jquery_ui_filter.module - Jquery UI filter process replacer: Inserts jQuery UI widget classes into text.
File
- ./
jquery_ui_filter.module, line 136 - Converts static HTML to a jQuery UI accordian or tabs widget.
Code
function _jquery_ui_filter_parse_tag_attributes($tag) {
preg_match_all('/(\\w+)\\s*=\\s*"([^"]+)"/', $tag, $matches);
$attributes = array(
'class' => '',
);
// Always include class attribute.
for ($i = 0, $len = count($matches[1]); $i < $len; $i++) {
$attributes[$matches[1][$i]] = htmlspecialchars_decode($matches[2][$i], ENT_QUOTES);
}
return $attributes;
}