Opened 11 years ago
Closed 8 years ago
#10751 closed defect (fixed)
Image macro now shows up in inline wiki markup
|Reported by:||Christian Boos||Owned by:||Ryan J Ollos|
|Cc:||Ryan J Ollos||Branch:|
The Image macro no longer renders inline XHTML elements by default. This avoids the appearance of images in the timeline, wiki section headings and other oneliner content. Inline XHTML elements can be explicitly specified using the
Description (last modified by )
Change History (17)
by , 11 years ago
follow-up: 2 comment:1 by , 11 years ago
comment:2 by , 11 years ago
Ok, so currently
is_inline is unconditionally
True … maybe we should return True only if explicitly specified, that way if you really want to have a picture in, say, a section title, you'd have to add the
comment:3 by , 11 years ago
|Milestone:||1.0 → next-stable-1.0.x|
comment:4 by , 10 years ago
Same problem with JOSM Trac
comment:5 by , 10 years ago
This happens if the Image macro is used within the first two lines of a ticket/comment.
by , 10 years ago
comment:6 by , 10 years ago
Replying to cboos:
Ok, so currently
True… maybe we should return True only if explicitly specified, that way if you really want to have a picture in, say, a section title, you'd have to add the
I did some experimenting and it seems like a good solution. There was a similar issue for Bloodhound's activity feed (bh:#279), which was temporarily worked-around by using the CSS
display: none for
img elements. The solution presented in this ticket seems like a better solution, at least for the timeline.
I worked in t10751, adding another parameter to
parse_args function. I considered calling
parse_args, but was unsure about this. I made an attempt at refactoring
ImageMacro.expand_macro to use
parse_args, which is the reason for the additional Image macro tests in the branch. The refactoring didn't work out - we need
strict = True in
parse_args to prevent a pathspec containing a
= character from being interpreted as a kw argument, but with
strict = True, a parameter such as
margin-left=10 isn't interpreted as a kw argument. I didn't see a way to solve that issue without making the code more complex than before the start of the refactoring, so I abandoned it.
comment:7 by , 10 years ago
It looks like I have an error in the comment for
:param: strict should be
:param strict:. I'll wait for feedback in case other changes are needed before fixing that.
comment:8 by , 10 years ago
Just spotted a place on the t.e.o site where there is an image in a section heading: see Clients. The patch proposed here would result in the need to edit that wiki markup to add the
inline parameter. That makes me think the change should be targeted for a 1.1.x milestone rather than a 1.0.x milestone.
comment:9 by , 9 years ago
comment:10 by , 9 years ago
comment:11 by , 8 years ago
|Milestone:||next-stable-1.0.x → 1.1.4|
|Status:||new → assigned|
Requested again in gmessage:trac-users:Zgsn-pFu2ww/NL_HfDe4hs8J.
comment:12 by , 8 years ago
|Release Notes:||modified (diff)|
Proposed changes in log:rjollos.git:t10751.2.
comment:13 by , 8 years ago
Looks good to me. I think it would lead no problem to apply it to 1.0-stable….
comment:14 by , 8 years ago
|Milestone:||1.1.4 → 1.0.5|
Thanks, I'll apply to 1.0-stable. I was on the fence about that anyway.
comment:15 by , 8 years ago
|Status:||assigned → closed|
Committed to 1.0-stable in [13791:13793], merged to trunk in [13794:13796].
snapshot from timeline:2012-06-28