diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php
index 00cd7203..e852dbbf 100644
--- a/include/plugin_api.inc.php
+++ b/include/plugin_api.inc.php
@@ -34,25 +34,6 @@ function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData,
= USERLEVEL_ADMIN ) {
-?>
-
-= USERLEVEL_ADMIN ) {
+ echo "
+function create(htmlStr) {
+ var frag = document.createDocumentFragment(),
+ temp = document.createElement('div');
+ temp.innerHTML = htmlStr;
+ while (temp.firstChild) {
+ frag.appendChild(temp.firstChild);
+ }
+ return frag;
+}
+\n";
+ }
+ // alway add \n\n for the last element dor plugins using this hook and start at line Col 1, to populate the (virtual) serendipity.js file
echo "
jQuery(function() {
jQuery('input[type=\"url\"]').change(function() {