step1profit / wmd

Automatically exported from code.google.com/p/wmd
0 stars 0 forks source link

WMD can't handle images embedded with data url scheme #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Here is some markdown that works in the Perl version (tested at 
http://daringfireball.net/projects/markdown/dingus ) but not in 
WMD:

------------------- Start

![Tux][1]

[1]: 
data:image/gif;base64,R0lGODlhMgAyAPf/AAEBAwcHCQsLDA4OEBQOBhAPER0UAhgUDBMTFRcXGB
cYGxoaGx8fICIZBCYdBy4gBDMkBTg
nBToqBCMjJCcnKCsrLCsoIzw3Lj44LjMzNDk3NDw6Njo6Oz8/QEAsBEExBk4zA048Bko6Clg7BVZCBld
GDFZCHGRGBW9NEm5OG2RMGW1W
Cm1VEXZMAXpPBHRcDmxdL3xkN0RERE5OTlRUVF1dXWdgUWJiY2dnaGxsbHNzc319fYxaAYRqCIphBZJh
ApdmCJJtCpJnF6NsAadxBad6DKt
0Aq58Bqt6CKRyDKZ4H7J7Brd+Drh/BY52To19SYJ2X5N3RpB3SbSPDruDBLiCDruIB7uKCbWAG7aSCqu
BJLOKOr+QIpeHXJmCXIiGfouGdJ+
Ob5uSf6KCSKSKV62ZVrqXT6KMY6GPcayXcMGHB8KLB8mOA8CLF8WVCcSbC82TBsuVCc+VEc+ZG8qTGNG
VBNGWCdabBtWbCNmeB9mf
CNWeE9KcHMSSIsmYMcKVMtOeKdKcJsyjDM6qC9WjCtWtDN2jCNuoC9izF9SjK9ilL9yqLde1JOKnB+Gm
CeWqBuWrCemvCuGrH+SzCuK6C
+yzC+y7CvC3CvS7Dvi/D/a9EPC7H+C7Ke69LOq7NOSyMsOhQsumWdavX9mzWN64XMSmZcOlat66ZNi5d
uC5XOrGC+vLE+3OGevCEfTG
B/LAC/DNE/fWDvXYD/bZJvbZKfHVLfTYON3AfeLGQO3JZvHRcoODg4uLjJSUlJubm6idi7Gki76qh7ip
j7OqmLuxnaSkpKysrLeyqLiwob24rbKy
sra2uLi4t728vL+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q7EIYWdvTs0ECpZJzEa0T3AMCOAnsff0CKpDWwKwrUkcxPqQMU1VgMAy0
lbJKUF2FjSVpIE65bBDUgZQAQX
DYnzxwRgPlDCkJmXw8UG7NPCBAxSkaO+52dG7DLcCCICAAgHMQK9B0cRRiRsi3BAbqIYOnZ0435RxwEk
TWPCFR/EoUokmrxwiQgeUZpflt
dn9w48nrgwydZcl4FKPQf5ocwopoyQCCSaaaJIJ/iESILDD0vYSC88nlsThwEkQvIEJOAa1w8cjkURSC
SZ4a0J5FgYAIEOvFUub0z3ULFIJHjx48EA
EJ1gxSSXYGMTNHpNjkknelmeCySs9NJVAL50eXCw71AACiSFwqEGFGnlsjUkn8hQUDx+xV2455ZhQQkJ
c5UJ0TzJcQDLJ8IY4MjntnohDED2
ARCI97XlTLsgDeFEJUTo2IAHJJZhUcskllsze/ia6mIdA6BEI9VmOfbS73RR+sbSyDYQZHHCA/S7BPtu
xDxOXyIVAuiGHSFAQgbXDhG5AARW0o
EMHVHnAEiCBQOlRrhKS8IacRJEH/IFwei9cQwx8gQ575OMe2uogRzFuoACTSGAJjljf9C4RCUmkIhwC0
Ycf6tCISliRerKzHeUiwYYWECABFcjA
Re5iEhAgEW+Vu0QlHJGIW8QDO9kIxR/asAY2wCEPhoBE9CqRhyW4IHNVKSMR7BAJS+wvEnegAyroIRF9
rEMaptiCEpJgBDXckRBwWAIPRnCB
HOygF74AZS9GyYtd3GAEPGjCHfMABypsYRst2Qc8rBGMMQjhBz/gQQtS8At1eAQZKODBEIxABCCQoYSV
OocwvOAENJQDJP4oRxicEIUzPEN
Ve3FaROj0kYAAADs%3D "Tux"

------------------- End

Note: make sure the [1]: ... is all on one line

What is the expected output? What do you see instead?
You should see a small image of Tux, the Linux penguin, but wmd obviously 
chokes on the parsing

What version of the product are you using? On what operating system?
Safari 4.0.1

Please provide any additional information below.
That big crazy string is an embedded base64 encoded image using the data: url 
scheme 
http://en.wikipedia.org/wiki/Data_URI_scheme

Original issue reported on code.google.com by bumper...@gmail.com on 26 Jul 2009 at 1:34