Defect #4253
Formatting errors in <code> block
| Status: | Closed | Start date: | 2009-11-20 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Text formatting | |||
| Target version: | - | |||
| Affected version: | devel | Resolution: | Fixed |
Description
In block characters < and > are replaced with HTML entities.
Example:
<pre><code class="html">
<embed src="/upload/banners/{$page_razdel}/{$key}.swf" width="498" height="70"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</code></pre>
<pre><code class="xml">
<web>
<host value="http://${admin_host::domain}/business/admin/" />
<static_host value="${admin_host::web::host}static/" />
<img_dir value="${admin_host::web::static_host}images/" />
<css_dir value="${admin_host::web::static_host}css/" />
<js_dir value="${admin_host::web::static_host}js/" />
<upload_dir value="${admin_host::web::host}upload/" />
</web>
</code></pre>
<pre><code class="php"><?php
$go_page = "onClick=\"return dropdownmenu(this, event, UserMenu('".htmlspecialchars($go_page)."', '".$row['user_id']."', '".$member_id['user_group']."'), '170px')\" onMouseout=\"delayhidemenu()\"";
if ($config['allow_alt_url'] == "yes") {
$tpl->set('{author}', "<a {$go_page} href=\"".$config['http_home_url']."user/".urlencode($row['name'])."/\">".$row['name']."</a>");
} else {
$tpl->set('{author}', "<a {$go_page} href=\"$PHP_SELF?sa=userinfo&user=".urlencode($row['name'])."\">".$row['name']."</a>");
}
?></code></pre>
Result:
Without works fine.
Related issues
History
Updated by Henrik Ammer about 2 years ago
Same here, just noted it when I added my own bug some seconds ago.
Seems like a Textile bug to me. I know that the Textileversion in PHP has even added a bc. for a block of code and even a bc.. if there are alot of newlines in it.
Updated by Henrik Ammer about 2 years ago
Redmine¶
Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database.
Redmine is open source and released under the terms of the GNU General Public License v2 (GPL).
Features¶
Some of the main features of Redmine are:
- Multiple projects support
- Flexible role based access control
- Flexible issue tracking system
- Gantt chart and calendar
- News, documents & files management
- Feeds & email notifications
- Per project wiki
- Per project forums
- Time tracking
- Custom fields for issues, time-entries, projects and users
- SCM integration (SVN, CVS, Git, Mercurial, Bazaar and Darcs)
- Issue creation via email
- Multiple LDAP authentication support
- User self-registration support
- Multilanguage support
- Multiple databases support
Read more about Redmine features.
Documentation¶
You can read the Redmine guide.
Other resources:Online demo¶
A shared online demo can be found at http://demo.redmine.org/. This demo is running a recent trunk version so you can evaluate the new features that have been added recently. It's been setup to give registered users the ability to create their own projects. This means once you register, you can create your own project on there and try out the project administration features.
Alternatively, you can get your own Redmine demo environment at http://m.redmine.org with full administrator privileges after filling a simple form. It is running a recent stable version of Redmine.
Support & getting help¶
For getting help or discussing about Redmine, you can browse the Redmine forums hosted right here in Redmine. We also have a fairly active chatroom - join #redmine on the freenode IRC network. Some more information about IRC is here
Before submitting a bug report, a patch or a feature request here, please read the Submission guidelines.
Contributing and helping out¶
Redmine is built and maintained by community volunteers. If you enjoy using it and would like to give back to the community, the Contribute page has several ideas. Software development experience is not required. Check out the Teams Page if you are interested in a specific area to contribute regularly.
You can also make a donation and get listed on the Redmine Donors page.
Who uses Redmine?¶
This page lists some companies and projects using Redmine.
macro mangles HTML entities in <pre> blocks (Closed)">#4243?Updated by Aleksej Lebedev about 2 years ago
Henrik Jönsson wrote:
Redmine¶
Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database.
Redmine is open source and released under the terms of the GNU General Public License v2 (GPL).
Features¶
Some of the main features of Redmine are:
- Multiple projects support
- Flexible role based access control
- Flexible issue tracking system
- Gantt chart and calendar
- News, documents & files management
- Feeds & email notifications
- Per project wiki
- Per project forums
- Time tracking
- Custom fields for issues, time-entries, projects and users
- SCM integration (SVN, CVS, Git, Mercurial, Bazaar and Darcs)
- Issue creation via email
- Multiple LDAP authentication support
- User self-registration support
- Multilanguage support
- Multiple databases support
Read more about Redmine features.
Documentation¶
You can read the Redmine guide.
Other resources:Online demo¶
A shared online demo can be found at http://demo.redmine.org/. This demo is running a recent trunk version so you can evaluate the new features that have been added recently. It's been setup to give registered users the ability to create their own projects. This means once you register, you can create your own project on there and try out the project administration features.
Alternatively, you can get your own Redmine demo environment at http://m.redmine.org with full administrator privileges after filling a simple form. It is running a recent stable version of Redmine.
Support & getting help¶
For getting help or discussing about Redmine, you can browse the Redmine forums hosted right here in Redmine. We also have a fairly active chatroom - join #redmine on the freenode IRC network. Some more information about IRC is here
Before submitting a bug report, a patch or a feature request here, please read the Submission guidelines.
Contributing and helping out¶
Redmine is built and maintained by community volunteers. If you enjoy using it and would like to give back to the community, the Contribute page has several ideas. Software development experience is not required. Check out the Teams Page if you are interested in a specific area to contribute regularly.
You can also make a donation and get listed on the Redmine Donors page.
Who uses Redmine?¶
This page lists some companies and projects using Redmine.
macro mangles HTML entities in <pre> blocks (Closed)">#4243?
Probably not, because the formatting does not work everywhere (in wiki, issues, comments, etc.)
I know Ruby is very bad, but looking at source:/trunk/lib/redmine/wiki_formatting/textile/formatter.rb@2824#L58 problem is probably in the wrong use of the method html, because :escape param does not exist in source:/trunk/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/html.rb@3014.
Most likely, this problem appeared after updating coderay to version 0.9.0, because in r2838 everything worked (coderay was updated in r3014).
Updated by Jean-Philippe Lang about 2 years ago
- Category set to Text formatting
- Status changed from New to Closed
- Resolution set to Fixed
Coderay upgrade reverted in r3079. Got lots of errors when parsing ruby source files.
Updated by Aleksej Lebedev about 2 years ago
- Status changed from Closed to Reopened
Maybe the best solution is simply to replace <, >, etc. back to the characters?
(As I understand it was made in source:/trunk/vendor/plugins/coderay-0.9.0/lib/coderay/for_redcloth.rb@3076)
Updated by Jean-Philippe Lang about 2 years ago
- Status changed from Reopened to Closed
As I said, I got many errors on redmine.org with coderay 0.9.
So this is not an option.
Updated by Mischa The Evil about 2 years ago
Jean-Philippe,
Please see issue #3359 for a dedicated issue regarding updating the CodeRay library.
Kind regards,
Mischa.