shr: replace newline with space in style parsing
authorJulien Danjou <julien@danjou.info>
Tue, 23 Nov 2010 09:47:00 +0000 (10:47 +0100)
committerJulien Danjou <julien@danjou.info>
Tue, 23 Nov 2010 09:47:00 +0000 (10:47 +0100)
Signed-off-by: Julien Danjou <julien@danjou.info>
lisp/ChangeLog
lisp/shr.el

index 33ccd98..94a2761 100644 (file)
@@ -1,5 +1,7 @@
 2010-11-23  Julien Danjou  <julien@danjou.info>
 
+       * shr.el (shr-parse-style): Replace \n with space in style parsing.
+
        * shr-color.el (shr-color-hsl-to-rgb-fractions): Use shr-color-hue-to-rgb.
        (shr-color->hexadecimal): Call shr-color-hsl-to-rgb-fractions.
 
index 21bfdd3..1efa31a 100644 (file)
@@ -540,6 +540,9 @@ START, and END."
 
 (defun shr-parse-style (style)
   (when style
+    (save-match-data
+      (when (string-match "\n" style)
+        (setq style (replace-match " " t t style))))
     (let ((plist nil))
       (dolist (elem (split-string style ";"))
        (when elem