Closed Bug 293519 Opened 20 years ago Closed 19 years ago

Need an ABBR extension that supports a "title" attribute

Categories

(developer.mozilla.org Graveyard :: General, defect)

Other
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: deb, Assigned: Waldo)

References

Details

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 StumbleUpon/1.9994
Build Identifier: 

We need an extension for the Devmo wiki that allows ABBR tags to have title
attributes.  For example: 

 <abbr title="Canadian Broadcasting Corporation">CBC</abbr>

Right now this doesn't work at all.

Reproducible: Always
Assignee: deb → shaver
Status: UNCONFIRMED → NEW
Ever confirmed: true
The ability to parse attributes from an extension tag is only available in
MediaWiki 1.5, so this will have to wait until that gets installed, but here it
is.  I'm pretty sure this'll work in 1.4.x, tho, but we won't get a title
attribute in the outputted code.

To ensure we validate, the extension only passes through a few known, valid
attributes.  The full list that <abbr/> takes is at
<http://www.w3.org/TR/REC-html40/struct/text.html#h-9.2.1>, but of those I
can't see a reason for us to need any more than just title/lang/dir.  If we
want more it's trivial to add them.

According to the following link, the values passed into the parsing function
are already htmlspecialchars()'d, so there's no danger simply outputting them
directly into the string.  That said, I haven't tested at all, so this needs
verification.

http://meta.wikimedia.org/wiki/MediaWiki_extensions_FAQ#How_can_I_pass_XML-style_parameters_in_my_extension_tag.3F
Assignee: shaver → jwalden+bmo
Status: NEW → ASSIGNED
Changing QA contact to the default QA so interested parties can watch bugs filed
before the default QA was changed.  Only bugs in an unfixed state have been
changed; fixed bugs are unlikely to be reopened, and more bugspam is always a
bad thing.  Sorry for the bugspam - filter it into your Junk folder by searching
for 'WhyDoesMediaWikiHaveToBeEvilAndNotAcceptArbitraryCharactersInTitlesAndLinks'.
QA Contact: deb → qa
The previous version of the patch had this nice little feature where instead of including the contents of the abbr tag inside the generated tag, it would include the already-generated parts of the generated tag inside the generated tag.  I fixed that and added support for id/class attributes, because I could see them possibly being useful sometime.  The patch is still untested.

Requesting review from shaver and hoping he can acquiesce...
Attachment #187991 - Attachment is obsolete: true
Attachment #210440 - Flags: review?
Attachment #210440 - Flags: review? → review?(shaver)
Comment on attachment 210440 [details] [diff] [review]
Fixes a glaring bug, supports class/id attributes too

r=shaver
Attachment #210440 - Flags: review?(shaver) → review+
Component: developer.mozilla.org → Infrastructure
Flags: review+
Product: mozilla.org → Mozilla Developer Center
QA Contact: qa → infrastructure
Version: other → unspecified
Attachment #210440 - Flags: review+
could someone privlaged enough please check this in, (but to devmowiki/... instead of mozilla-org) will create version 1.2 of "Abbr.php".

May require followup in LocalSetting.php if it is not allready included.
Checking in Abbr.php;
/cvsroot/devmowiki/extensions/Abbr.php,v  <--  Abbr.php
new revision: 1.2; previous revision: 1.1
done

Just committed it. Nothing more.
based on [[Sandbox:Abbr]] this does needs LocalSettings.php inclusion.
...or my last comment could have been from lack of sleep and that the MDC was not updated with the cvs checkin automagically.
First patch broke developer-stage, after a slight panick between me and shaver and some digging, we discovered this to fix it.

r+=shaver over IRC.

(Reed if your still around, can you commit this please)
Attachment #219973 - Flags: review+
Checking in Abbr.php;
/cvsroot/devmowiki/extensions/Abbr.php,v  <--  Abbr.php
new revision: 1.3; previous revision: 1.2
done

Committed.
...verify when it goes live.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Depends on: 335690
Component: Deki Infrastructure → Other
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: