1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
This is a sample message body with some embedded urls such as Google's<br>
search page at <a href="http://www.google.com">www.google.com</a>. Did it capture that last period? I hope<br>
not! How about <a href="ftp://ftp.freebsd.org/pub/FreeBSD/">ftp.freebsd.org/pub/FreeBSD/</a> or even an email address<br>
like <a href="mailto:fejj@gnome.org">fejj@gnome.org</a>? It should also work with mailto urls. Let's try<br>
it, shall we? We can use <a href="mailto:fejj@gnome.org">mailto:fejj@gnome.org</a> as a simple case...<br>
<br>
We should also check that GMimeFilterHTML is able to detect full urls<br>
like <a href="https://github.com/jstedfast/gmime">https://github.com/jstedfast/gmime</a> - GMime's very own website!<br>
<br>
Or <a href="file://localhost/dev/null">file://localhost/dev/null</a> file URLs.<br>
<br>
GMime's URL scanner should also work more complex urls:<br>
<br>
- addr-spec w/ domain literal: <a href="mailto:fejj@[127.0.0.1]">fejj@[127.0.0.1]</a><br>
- web url w/ domain literal: <a href="http://[127.0.0.1]/index.html">http://[127.0.0.1]/index.html</a><br>
- web url w/ username: <a href="http://user@domain.com/index.html">http://user@domain.com/index.html</a><br>
- web url w/ user & pass: <a href="http://user:pass@domain.com:80/index.html">http://user:pass@domain.com:80/index.html</a><br>
- web url w/ user and domain literal: <a href="http://user@[127.0.0.1]/index.html">http://user@[127.0.0.1]/index.html</a><br>
- web url w/ IPv6 domain literals:<br>
- <a href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a><br>
- <a href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a><br>
- <a href="http://[3ffe:2a00:100:7031::1">http://[3ffe:2a00:100:7031::1</a>]<br>
- <a href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a><br>
- <a href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a><br>
- <a href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a><br>
- <a href="http://[2010:836B:4179::836B:4179">http://[2010:836B:4179::836B:4179</a>]<br>
- web url surrounded by []'s: [<a href="http://www.google.com/">http://www.google.com/</a>]<br>
- web url surrounded by ()'s: (<a href="http://www.google.com/">http://www.google.com/</a>)<br>
- web url surrounded by {}'s: {<a href="http://www.google.com/">http://www.google.com/</a>}<br>
- web url surrounded by <>'s: <<a href="http://www.google.com/">http://www.google.com/</a>><br>
- web url with brackets: <a href="http://www.google.com/symbols.(123){1}[2].html">http://www.google.com/symbols.(123){1}[2].html</a><br>
<br>
And how about quoting? Let's give that a try...<br>
<br>
<font color="#008888">> This is one level of quoting</font><br>
<font color="#008888">> > And this is two levels of quoting</font><br>
<font color="#008888">> > Yet more text that is quoted twice...</font><br>
<font color="#008888">> This is back down to one level...</font><br>
<font color="#008888">> > > And this is three levels! WOW! CRAZY!</font><br>
Okay, let's not get too carried away...<br>
<br>
Did that work as expected?<br>
<br>
Now let's try adding some unicode text: 格ヌ込都広フこ海者じあー女石タカ聞罪ル産表サウルラ様優ケ払死政ぐ今球キリト並小りし暮題原ケ社6行ユシリ約療ーぞを支南ょ著動セム間果月初沢すもぞや。39新田ろく談囲トアヘネ表習検ヘ料募スぶよむ会末う込東しへご用74実慣葬4一びな見連ゅひぐ額算べぎっ初節こー視画記ツフ害質破五小ゃトょり。<br>
<br>
|