tweeper.php: support host-specific methods for preprocessing the HTML data
[tweeper.git] / tweeper.php
index 2444a39..efc0fd6 100644 (file)
@@ -257,6 +257,11 @@ class Tweeper {
       return NULL;
     }
 
       return NULL;
     }
 
+    $preprocess_html_host_method = 'preprocess_html_' . str_replace(".", "_", $host);
+    if (method_exists($this, $preprocess_html_host_method)) {
+      $html = call_user_func_array(array($this, $preprocess_html_host_method), array($html));
+    }
+
     $xmlDoc = $this->html_to_xml($html, $host);
     if (NULL === $xmlDoc) {
       return NULL;
     $xmlDoc = $this->html_to_xml($html, $host);
     if (NULL === $xmlDoc) {
       return NULL;