Defect #102
closedEmail addresses entered in Wiki pages are corrupted. Appears a mailto link is partly built.
0%
Description
Email addresses entered in Wiki pages are corrupted. Appears a mailto link is partly built.
Using revision 676
Example:
Files
Updated by Jean-Philippe Lang about 17 years ago
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 about 17 years ago
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 about 17 years ago
I can't reproduce. Your example works fine for me.
Could you post the corresponding rendered html ?
Updated by Brian DeGregorio about 17 years ago
<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 about 17 years ago
Is RedCloth what performs that conversion? I tried updating
it but it didn't effect the problem.
Updated by Brian DeGregorio about 17 years ago
Forgot to paste this in. I'm running RedCloth v3.0.4
Updated by Jean-Philippe Lang about 17 years ago
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 about 17 years ago
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 about 17 years ago
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 about 17 years ago
I'm using Ruby v1.8.5, Rails v.1.2.3, and RedCloth v3.0.4.
Updated by Jean-Philippe Lang about 17 years ago
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.com
a>
(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 about 17 years ago
URLs address in the wiki page display correctly.
<a href="http://www.test.com">http://www.test.com
</a>
Updated by Brian DeGregorio about 17 years ago
Fixed when I updated to r724.
Thanks for resolving this.