- attached 3 Result View.png
URLs in {code:xml}
If i enter URLs in a XML-Snippet in a {code:xml}-Tag, it works fine in the preview, but in the result view it gets surrounded by <a>-Tags.
This makes our code snippets unusable.
Comments (26)
-
reporter -
repo owner Thank's for reporting! I guess I have to add auto-links: false parameter to prevent URLs to be clickable, because JIRA Syntax Highlighter Macro is setting RenderMode.allow(RenderMode.F_HTMLESCAPE); which means that characters get escaped. I will have a closer look.
Cheers, Holger
-
repo owner I have tried to reproduce your problem in JIRA 6.2.4, but don't see the problem there. Which version of JIRA are you using?
Cheers, Holger
-
reporter Hi, we are using JIRA 6.1.3
-
repo owner Hm, I am not able to reproduce. I set up JIRA 6.1.3 and used an example from http://www.w3schools.com/schema/schema_schema.asp and see both in preview and view issue screen the right layout.
-
reporter Could you please add the same content with {noformat}-tag and without any tag? It looks this for us (attached file).
I will do a sql-query to select what the db says.
thank you for prompt help.
-
reporter - attached 2014-05-09_07h09_08.jpg
-
repo owner It is simply
{code:xml} <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified"> </xs:schema> {code}
But if you use JIRA Syntax Highlighter the URLs are clickable, so a <a href=""> is inserted by the plugin. Somehow it looks like the < gets escaped and therefore is not shown as a proper link.
Which version of JIRA Syntax Highlighter are you using? Did you recently updated from a previous version?
-
reporter We are using v1.8.0 and did not do any update the last 90 days. i think this behaviour did not recently appeared, but we didn't notice this yet.
This is the sourcecode delivered on loading the issue:
<div style='margin-left: 1em;'><pre class='brush: xml; toolbar: false;'> <archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="maven-cosa-business-webservice"> </pre><img onload='SyntaxHighlighter.highlight();' style='display:none;' src='/s/de_DEhokmc1-1988229788/6158/17/1.8.0/_/download/resources/jira.plugin.syntaxhighlighter.macro.syntaxplugin:images/blank.png'/></div> </div>
here seems indeed something to be escaped. is this normal?
-
repo owner That HTML source code delivered on loading the issue looks perfect.
Which browser and operating system are you using?
-
repo owner - changed milestone to 1.9.0
-
reporter We are using Windows 7. Thank you for this hint, i tested now with different browsers. Result:
Firefox 24.5.0 ESR does not work Chrome 34.0 does not work IE 10 does work
-
repo owner See commit 838a809 for bugfix details.
-
repo owner -
assigned issue to
- changed status to resolved
-
assigned issue to
-
reporter i'm afraid this does not completely solve the problem: the links are now not longer clickable, but there is still the <a-tag surrounding the http://example.de-text.
so it would be ok for us, if the link was clickable, but it's not solved as long as the <a-tag appears still to us. Can you reproduce?
-
repo owner In my company we use Firefox 24.3.0 ESR and IE 8 on Windows 7 with and JIRA 6.2 and 5.2 on Linux and don’t have these problems. Can you check with other colleagues if this is a problem with your local browser or your company installation of your browser?
-
reporter I tested on the browsers in this screenshot. i deactevated all plugins and add-ons. i will be able to test with a normal (not esr) firefox release in a few days. the delivered source code is everywhere the same, so i don't think it's a server-side problem (e.g. a jira version problem).
are you able to test with one of the same versions as i tested?
-
repo owner - changed status to open
-
repo owner I have problems to reproduce the bug locally and therefor as for your help. Could you please download https://bitbucket.org/hski/syntaxplugin-public/downloads/syntaxhighlighter-test.zip, unzip the file and then open test.html for folder 3.0.83 and 3.0.9. You should see the same problem with 3.0.83, right? Is the problem solved in 3.0.9?
Cheers Holger
-
reporter I'm afraid, i can not reproduce this in v3.0.83, too. In our JIRA-Instance we are using Add-On v1.9.0 and there the problem still happens.
-
repo owner Thanks for your feedback! I will prepare another test case with escaped content inside the <pre> tag.
-
repo owner I am currently working on a major change switching from JavaScript/client side to Java/server side syntax highlighting. This will fix
#42,#48(problems with certain browser versions),#44(syntax highlighting in activity streams) and#45(syntax highlighting in emails),#46and#47(interference with other plugins like Links Hierarchy and JEMH using regex JS lib).Would you be able to test a beta release of this plugin?
-
repo owner - changed milestone to 2.0.0
-
reporter Sorry for late answer - i am not able to beta-test a unstable product with major changes because we are currently running only a productive instance. but if this version is stable, i will install it and check if our problem persists or not.
-
repo owner Version 2.0.0-beta1 is now available for download here, which fixes the problem described here.
Please raise an issue here, if you find any other problems or bugs with this new major release.
Currently brushes for Objectiv-C, TCL, Gherkin and D are missing, but will be delivered as part of 2.0.0-beta2 resp. the final release.
Best regards, Holger
P.S. No problem, that you are not able to test. I hope to get feedback from other user to be sure, everything works fine after this major change.
-
repo owner - changed status to resolved
- Log in to comment