aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2007-10-08 16:49:38 +0000
committerWaylan Limberg <waylan@gmail.com>2007-10-08 16:49:38 +0000
commitf75630b4bb4822b98e85db044b907a7a3a161d4f (patch)
tree161369d8ac583292c14471c9ac412d7194777076
parent83ae589dfbf7e8331642fe0d6951655825eff56d (diff)
downloadmarkdown-f75630b4bb4822b98e85db044b907a7a3a161d4f.tar.gz
markdown-f75630b4bb4822b98e85db044b907a7a3a161d4f.tar.bz2
markdown-f75630b4bb4822b98e85db044b907a7a3a161d4f.zip
Empty inline image link - fixed [1799251]
-rw-r--r--markdown.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/markdown.py b/markdown.py
index cb90171..1e8a56f 100644
--- a/markdown.py
+++ b/markdown.py
@@ -767,7 +767,10 @@ class ImagePattern (Pattern):
def handleMatch(self, m, doc):
el = doc.createElement('img')
src_parts = m.group(9).split()
- el.setAttribute('src', src_parts[0])
+ if src_parts :
+ el.setAttribute('src', src_parts[0])
+ else:
+ el.setAttribute('src', "")
if len(src_parts) > 1 :
el.setAttribute('title', dequote(" ".join(src_parts[1:])))
if ENABLE_ATTRIBUTES :