https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292019-07-08T08:35:35ZRedmineRedmine - Defect #31695: Convert HTML links to Textile/Markdown links when creating an issue from an emailhttps://www.redmine.org/issues/31695?journal_id=927442019-07-08T08:35:35ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/23471">fixed-31695.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23471/fixed-31695.patch">fixed-31695.patch</a> added</li></ul><p>I attached a patch for Textile and Markdown.</p> Redmine - Defect #31695: Convert HTML links to Textile/Markdown links when creating an issue from an emailhttps://www.redmine.org/issues/31695?journal_id=929152019-07-31T08:21:00ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul> Redmine - Defect #31695: Convert HTML links to Textile/Markdown links when creating an issue from an emailhttps://www.redmine.org/issues/31695?journal_id=929572019-08-05T06:54:08ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>4.1.0</i></li></ul><p>Setting the target version to 4.1.0.</p> Redmine - Defect #31695: Convert HTML links to Textile/Markdown links when creating an issue from an emailhttps://www.redmine.org/issues/31695?journal_id=930412019-08-11T05:02:05ZGo MAEDA
<ul><li><strong>Subject</strong> changed from <i>Convert the A tag to Textile / Markdown when creating an issues from HTML email</i> to <i>Convert HTML links to Textile/Markdown links when creating an issue from an email</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed the patch. Thank you for improving Redmine.</p> Redmine - Defect #31695: Convert HTML links to Textile/Markdown links when creating an issue from an emailhttps://www.redmine.org/issues/31695?journal_id=947652019-11-04T20:11:31ZMarius BÄ‚LTEANU
<ul><li><strong>File</strong> <a href="/attachments/24279">tests_for_a_elements_without_href.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/24279/tests_for_a_elements_without_href.patch">tests_for_a_elements_without_href.patch</a> added</li><li><strong>File</strong> <a href="/attachments/24280">fix_for_links_without_href.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/24280/fix_for_links_without_href.patch">fix_for_links_without_href.patch</a> added</li><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>The current implementation fails with the following error if the link doesn't contain the <code>href</code> attribute.</p>
<pre>
Error:
Redmine::WikiFormatting::MarkdownHtmlParserTest#test_should_not_convert_a_tag_without_href:
NoMethodError: undefined method `value' for nil:NilClass
lib/redmine/wiki_formatting/markdown/html_parser.rb:40:in `block in <class:HtmlParser>'
lib/redmine/wiki_formatting/html_parser.rb:58:in `scrub'
lib/redmine/wiki_formatting/html_parser.rb:36:in `to_text'
test/unit/lib/redmine/wiki_formatting/markdown_html_parser_test.rb:41:in `test_should_not_convert_a_tag_without_href'
</pre>
<p>I'm attaching:<br />1. Tests for for markdown and textile which fail on the current trunk<br />2. A proposed fix, but I'm not sure if <code>foo<a name="Header-one">bar</a>baz</code> should be converted to <code>foo bar baz</code> or to <code>foobarbaz</code>.</p> Redmine - Defect #31695: Convert HTML links to Textile/Markdown links when creating an issue from an emailhttps://www.redmine.org/issues/31695?journal_id=947822019-11-05T22:00:14ZGo MAEDA
<ul></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>The current implementation fails with the following error if the link doesn't contain the <code>href</code> attribute.</p>
</blockquote>
<p>Thank you for catching and fixing the error.</p>
<blockquote>
<p>2. A proposed fix, but I'm not sure if <code>foo<a name="Header-one">bar</a>baz</code> should be converted to <code>foo bar baz</code> or to <code>foobarbaz</code>.</p>
</blockquote>
<p>I think we can omit the surrounding spaces for that case. Text generated from `<code><a href="http://www.example.com/">foo</a></code>` style HTML should have surrounding spaces because Textile link `"foo":http://www.example.com/` does not work without surrounding spaces. However, the text "bar" you will get by converting from `<code><a name="Header-one">bar</a></code>` does not have any markup and will be always rendered properly. So, I think the surrounding spaces are unnecessary.</p> Redmine - Defect #31695: Convert HTML links to Textile/Markdown links when creating an issue from an emailhttps://www.redmine.org/issues/31695?journal_id=948082019-11-06T21:38:14ZMarius BÄ‚LTEANU
<ul></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Marius BALTEANU wrote:</p>
<blockquote>
<p>The current implementation fails with the following error if the link doesn't contain the <code>href</code> attribute.</p>
</blockquote>
<p>Thank you for catching and fixing the error.</p>
<blockquote>
<p>2. A proposed fix, but I'm not sure if <code>foo<a name="Header-one">bar</a>baz</code> should be converted to <code>foo bar baz</code> or to <code>foobarbaz</code>.</p>
</blockquote>
<p>I think we can omit the surrounding spaces for that case. Text generated from `<code><a href="http://www.example.com/">foo</a></code>` style HTML should have surrounding spaces because Textile link `"foo":http://www.example.com/` does not work without surrounding spaces. However, the text "bar" you will get by converting from `<code><a name="Header-one">bar</a></code>` does not have any markup and will be always rendered properly. So, I think the surrounding spaces are unnecessary.</p>
</blockquote>
<p>Great! Please feel free to update the patches.</p> Redmine - Defect #31695: Convert HTML links to Textile/Markdown links when creating an issue from an emailhttps://www.redmine.org/issues/31695?journal_id=948292019-11-09T06:06:33ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>The current implementation fails with the following error if the link doesn't contain the <code>href</code> attribute.</p>
</blockquote>
<p>Committed the patches. Thank you.</p>