Defect #102
closedEmail addresses entered in Wiki pages are corrupted. Appears a mailto link is partly built.
Added by Brian DeGregorio over 19 years ago. Updated almost 10 years ago.
Description
Email addresses entered in Wiki pages are corrupted. Appears a mailto link is partly built.
Using revision 676
Example:
Files
| Screenshot.png (11.3 KB) Screenshot.png | Brian DeGregorio, 2008-02-03 10:51 |
Updated by Jean-Philippe Lang over 19 years ago
Actions
#1
Could you give more details about your example. Is it what you
typed ? What did you expect and what did you get ?
If I enter test@test.com, I get a valid mailto link.
Updated by Brian DeGregorio over 19 years ago
Actions
#2
Thought maybe it was the tables so put an email outside the
table too. Will attach screen shot of the preview page, but
saved page also shows the problem.
Typed in wiki editor:
Test Page¶
| _=.Name | _=.Title | _=.Email | _=.Phone | _=.IM |
| First LastName | President | test@test.com | test@hotmail.com |
|
| Other Name | Inspector | test@test.com |
Updated by Jean-Philippe Lang over 19 years ago
Actions
#3
I can't reproduce. Your example works fine for me.
Could you post the corresponding rendered html ?
Updated by Brian DeGregorio over 19 years ago
Actions
#4
<div class="wiki">
<h1>Test Page</h1>
<table>
<tr>
<td> _=.Name </td>
<td> _=.Title </td>
<td> _=.Email </td>
<td> _=.Phone </td>
<td> _=.IM </td>
</tr>
<tr>
<td> First LastName </td>
<td> President </td>
<td> <a href="mailto:<a
href="mailto:test@test.com">test@test.com</a>&
quot;><a
href="mailto:test@test.com">test@test.com</a>&
lt;/a> </td>
<td> </td>
<td> <a href="mailto:<a
href="mailto:test@hotmail.com">test@hotmail.com</
a>"><a
href="mailto:test@hotmail.com">test@hotmail.com</
a></a> </td>
</tr>
<tr>
<td> Other Name </td>
<td> Inspector </td>
<td> <a href="mailto:<a
href="mailto:test@test.com">test@test.com</a>&
quot;><a
href="mailto:test@test.com">test@test.com</a>&
lt;/a> </td>
<td> </td>
<td> </td>
</tr>
</table>
<p><a href="mailto:<a
href="mailto:test@test.com">test@test.com</a>&
quot;><a
href="mailto:test@test.com">test@test.com</a>&
lt;/a></p>
Updated by Brian DeGregorio over 19 years ago
Actions
#5
Is RedCloth what performs that conversion? I tried updating
it but it didn't effect the problem.
Updated by Brian DeGregorio over 19 years ago
Actions
#6
Forgot to paste this in. I'm running RedCloth v3.0.4
Updated by Jean-Philippe Lang over 19 years ago
Actions
#7
I'm also using RedCloth 3.0.4
RedCloth shouldn't turn mail adress into mailto link.
In my case:
RedCloth.new("test@test.com").to_html
=> "<p>test@test.com</p>"
Can you do this test ?
Mailto links are generated by the auto_link Rail's helper
Here's the piece code in the app:
auto_link(RedCloth.new(text, [:hard_breaks]).to_html)
In your case, it looks like mailto links are generated twice.
Updated by Brian DeGregorio over 19 years ago
Actions
#8
RedCloth test works
irb(main):009:0> RedCloth.new("test@test.com").to_ht
ml
=> "<p>test@test.com</p>"
Rails test works
irb(main):013:0> auto_link(RedCloth.new("test@test.com%qu
ot;,
[:hard_breaks]).to_html)
=> "<p><a
href=\"mailto:test@test.com\">test@test.com</a>
;</p>"
Updated by Brian DeGregorio over 19 years ago
Actions
#9
What versions of Ruby, Rails, and RedCloth are you running?
I just tested the same email address on the demo site and it
worked correctly.
Updated by Brian DeGregorio over 19 years ago
Actions
#10
I'm using Ruby v1.8.5, Rails v.1.2.3, and RedCloth v3.0.4.
Updated by Jean-Philippe Lang over 19 years ago
Actions
#11
Exactly the same as you.
I get the same result as you if I type in the wiki:
<a href="mailto:test@test.com">test@test.coma>
(the full html mailto link), but it's ok if I just type
test@test.com
I can't see why the mail adress is turned twice into link in
your case.
What happens with regular html link ? For example, what do you
get if you type http://test.com ?
Updated by Brian DeGregorio over 19 years ago
Actions
#12
URLs address in the wiki page display correctly.
<a href="http://www.test.com">http://www.test.com
</a>
Updated by Brian DeGregorio about 19 years ago
Actions
#13
Fixed when I updated to r724.
Thanks for resolving this.