Defect #102

Email addresses entered in Wiki pages are corrupted. Appears a mailto link is partly built.

Added by Brian DeGregorio about 13 years ago. Updated over 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution: Affected version:

Description

Email addresses entered in Wiki pages are corrupted. Appears a mailto link is partly built.

Using revision 676

Example:

">

Screenshot.png (11.3 KB) Brian DeGregorio, 2008-02-03 10:51

History

#1 Updated by Brian DeGregorio about 13 years ago

Fixed when I updated to r724.

Thanks for resolving this.

#2 Updated by Brian DeGregorio about 13 years ago

URLs address in the wiki page display correctly.

<a href="http://www.test.com">http://www.test.com
</a>

#3 Updated by Jean-Philippe Lang about 13 years ago

Exactly the same as you.

I get the same result as you if I type in the wiki:
<a href="mailto:">a>
(the full html mailto link), but it's ok if I just type

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 ?

#4 Updated by Brian DeGregorio about 13 years ago

I'm using Ruby v1.8.5, Rails v.1.2.3, and RedCloth v3.0.4.

#5 Updated by Brian DeGregorio about 13 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.

#6 Updated by Brian DeGregorio about 13 years ago

RedCloth test works

irb(main):009:0> RedCloth.new("").to_ht
ml
=> "<p></p>"

Rails test works

irb(main):013:0> auto_link(RedCloth.new("%qu
ot;,
[:hard_breaks]).to_html)
=> "<p><a
href=\"mailto:\"></a>
;</p>"

#7 Updated by Jean-Philippe Lang about 13 years ago

I'm also using RedCloth 3.0.4

RedCloth shouldn't turn mail adress into mailto link.
In my case:

RedCloth.new("").to_html

=> "<p></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.

#8 Updated by Brian DeGregorio about 13 years ago

Forgot to paste this in. I'm running RedCloth v3.0.4

#9 Updated by Brian DeGregorio about 13 years ago

Is RedCloth what performs that conversion? I tried updating
it but it didn't effect the problem.

#10 Updated by Brian DeGregorio about 13 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>&nbsp;</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>&nbsp;</td>
            <td>&nbsp;</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>

#11 Updated by Jean-Philippe Lang about 13 years ago

I can't reproduce. Your example works fine for me.
Could you post the corresponding rendered html ?

#12 Updated by Brian DeGregorio about 13 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
Other Name Inspector

#13 Updated by Jean-Philippe Lang about 13 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 , I get a valid mailto link.

Also available in: Atom PDF