Use re.DOTALL to also match newlines with .
[sitecorepy.git] / sitecore / alt_tags.py
index 11aa9d8ed689d3ffbd2b5a4d60bba8d39f3f1f64..df4a4f89eb404478b707eb49b91afc3d9319ba8d 100644 (file)
@@ -47,7 +47,8 @@ def add_headshot_alt_tags(s):
         except NoSuchElementException, e:
             s.logger.info("can't lock %s (already locked?), skipping" % raw_name)
             continue
-        alt_granddad,alt_tag = s.find_field(re.compile('.*Alt:.*'), 'Alt')
+        alt_granddad,alt_tag = s.find_field(
+            re.compile('.*Alt:.*', re.DOTALL), 'Alt')
         alt_tag.clear()
         alt_tag.send_keys(name)
         s.publish_section('Added alt tag for %s' % name)