Project

General

Profile

Actions

Defect #102

closed

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

Added by Brian DeGregorio over 16 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

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
Actions #1

Updated by Jean-Philippe Lang over 16 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.

Actions #2

Updated by Brian DeGregorio over 16 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

Actions #3

Updated by Jean-Philippe Lang over 16 years ago

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

Actions #4

Updated by Brian DeGregorio over 16 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>
Actions #5

Updated by Brian DeGregorio over 16 years ago

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

Actions #6

Updated by Brian DeGregorio over 16 years ago

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

Actions #7

Updated by Jean-Philippe Lang over 16 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.

Actions #8

Updated by Brian DeGregorio over 16 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>"

Actions #9

Updated by Brian DeGregorio over 16 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.

Actions #10

Updated by Brian DeGregorio over 16 years ago

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

Actions #11

Updated by Jean-Philippe Lang over 16 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 ?

Actions #12

Updated by Brian DeGregorio over 16 years ago

URLs address in the wiki page display correctly.

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

Actions #13

Updated by Brian DeGregorio over 16 years ago

Fixed when I updated to r724.

Thanks for resolving this.

Actions

Also available in: Atom PDF