https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292018-12-20T23:41:27ZRedmineRedmine - Defect #30256: Cannot make cross-project wiki link if the project name includes square bracketshttps://www.redmine.org/issues/30256?journal_id=891082018-12-20T23:41:27ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-1 priority-4 priority-default" href="/issues/20397">Defect #20397</a>: project:someproject wiki syntax should link to project with identifier "someproject', not name.</i> added</li></ul> Redmine - Defect #30256: Cannot make cross-project wiki link if the project name includes square bracketshttps://www.redmine.org/issues/30256?journal_id=893452019-01-11T06:06:23ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/22154">30256-make-wiki-link-includes-brackets.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/22154/30256-make-wiki-link-includes-brackets.patch">30256-make-wiki-link-includes-brackets.patch</a> added</li></ul><p>I reviewed the regular expression as follows.(Change from "greedy quantifier" to "lazy quantifier")<br /><a class="external" href="https://ruby-doc.org/core-2.6/doc/regexp_rdoc.html#label-Repetition">https://ruby-doc.org/core-2.6/doc/regexp_rdoc.html#label-Repetition</a><br />I attached a patch.<br /><pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index e250c20ee..8fa56ac55 100644
</span><span class="gd">--- a/app/helpers/application_helper.rb
</span><span class="gi">+++ b/app/helpers/application_helper.rb
</span><span class="p">@@ -787,7 +787,7 @@</span> module ApplicationHelper
# [[project:mypage]]
# [[project:mypage|mytext]]
def parse_wiki_links(text, project, obj, attr, only_path, options)
<span class="gd">- text.gsub!(/(!)?(\[\[([^\]\n\|]+)(\|([^\]\n\|]+))?\]\])/) do |m|
</span><span class="gi">+ text.gsub!(/(!)?(\[\[([^\n\|]+?)(\|([^\n\|]+?))?\]\])/) do |m|
</span> link_project = project
esc, all, page, title = $1, $2, $3, $5
if esc.nil?
</code></pre></p> Redmine - Defect #30256: Cannot make cross-project wiki link if the project name includes square bracketshttps://www.redmine.org/issues/30256?journal_id=897192019-02-02T06:23:59ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul> Redmine - Defect #30256: Cannot make cross-project wiki link if the project name includes square bracketshttps://www.redmine.org/issues/30256?journal_id=904622019-02-27T15:02:14ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next minor release</i> to <i>4.0.3</i></li></ul><p>LGTM. Setting the target version to 4.0.3.</p> Redmine - Defect #30256: Cannot make cross-project wiki link if the project name includes square bracketshttps://www.redmine.org/issues/30256?journal_id=904652019-02-27T23:44:56ZGo MAEDA
<ul><li><strong>Subject</strong> changed from <i>Cannot make cross-project wiki link if the project name includes "[" or "]"</i> to <i>Cannot make cross-project wiki link if the project name includes square brackets</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</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 your contribution.</p> Redmine - Defect #30256: Cannot make cross-project wiki link if the project name includes square bracketshttps://www.redmine.org/issues/30256?journal_id=905172019-03-03T01:46:30ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul>