Opened 14 years ago
Closed 14 years ago
#7716 closed enhancement (fixed)
CamelCase links are not correctly created when using Firefox 3.6.9 or above
Reported by: | anonymous | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Component: | TracWysiwygPlugin |
Severity: | normal | Keywords: | Firefox |
Cc: | Trac Release: | 0.11 |
Description
When adding a CamelCase in wysiwyg mode, a link like
<trac location>/wiki/CamelCase
should be created. Instead, when using FF 3.6.9 or above a link like
http://myserver/mytrac/search/opensearch?q=wiki%3ACamelCase
shows up, which obviously does not work. I tracked this down to the use of insertHTML()
in wysiwyg.js
, which, since FF 3.6.9 drops all custom HTML tags, in this case e.g. tracwysiwyg-autolink
. This problem has already been filed at Mozilla as Bug 596300 - Element Attributes dropped in DesignMode/ContentEditable sections.
We use Trac 0.11.7 with TracWysiwygPlugin 0.11.0.2 (r8691). Since we always try to keep up with Mozillas update for security reasons, I wonder if there is any workaround for the changed behavior of FF.
Remark: as I understand from the discussion at Bug 596300 the use of data-*
custom attributes is recommended, but only supported in FF 4.0b7. So probably at least a change to e.g. data-tracwysiwyg-autolink could prepare TracWysiwyg for an upgraded version of FF ;-)
Attachments (2)
Change History (9)
comment:1 follow-up: 2 Changed 14 years ago by
Changed 14 years ago by
Attachment: | wysiwyg.js.diff added |
---|
Patch against wysiwyg.js of [8691] to avoid custom element attributes
comment:2 follow-up: 3 Changed 14 years ago by
Oops, I'm sorry I haven't tested my patch with M$-IE due to debugging on Linux!
IE does not like my type="hidden"
attribute, but the new attributes
in the hidden input tags make even IE8 happy ;-)
Use wysiwyg.js.IEok.diff
for patching wysiwyg.js of revision [8691]!
comment:3 follow-up: 4 Changed 14 years ago by
Unfortunately I cannot attach my patch since the server rejects it:
500 Internal Server Error (Submission rejected as potential spam (Content contained these blacklisted patterns: '(?i)display:\s*none'))
This is just what does the trick!
comment:4 Changed 14 years ago by
So just zipping the "dangerous" file is obviously enough to be able to upload it!
comment:5 Changed 14 years ago by
Great work! It works flawlessly - I would appreciate seeing it merged into the official trunk/branches.
comment:6 Changed 14 years ago by
comment:7 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I fixed the issue in [9387]. If you can reproduce, please reopen the issue. Thanks for your reporting.
I've just implemented a workaround which avoids the use of custom attributes by wrapping all anchors in a
span
element and moving the data in hidden input fields also within thisspan
element. This requires changes only increateAnchor()
andpushAnchor()
ofwysiwyg.js
. The attached patch applies against [8691], the 0.11 branch.I've only tested it using Trac 0.11.7 using Firefox 3.6.10 (Windows & Linux).
Since my Javascript and HTML knowledge is limited I may have overlooked other issues, so please verify its correctness!