Opened 9 years ago

Closed 6 years ago

Last modified 6 years ago

#6750 closed (fixed)

Invalid xhtml in AdminFileWidget (target="_blank")

Reported by: Marc Garcia Owned by:
Component: contrib.admin Version: newforms-admin
Severity: Keywords: admin invalid xhtml AdminFileWidget nfa-someday
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

As requested in #5695, here is the fix for the invalid xhtml in the AdminFileWidget. It's just a target="_blank" replaced by the javascript open.window().

May be I could develop another patch changing string variables by a dictionay to make the code clearer.

Attachments (1)

6750.diff (829 bytes) - added by Marc Garcia 9 years ago.
Patch for the ticket (without a dictionary as string variables)

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by Marc Garcia

Attachment: 6750.diff added

Patch for the ticket (without a dictionary as string variables)

comment:1 Changed 9 years ago by Jacob

Triage Stage: UnreviewedDesign decision needed

Hm. I'm not sure I like doing this all that much -- embedding Javascript in HTML in Python feels super yucky. Personally, I'm OK with the invalid XHTML as long at it works.

comment:2 Changed 9 years ago by Marc Garcia

Keywords: fs-rf added

What about simply removing the target="_blank", or moving the javascript to a .js file?

It's supposed to be a framework for perfectionists, we shouldn't leave the invalid code in there... ;)

comment:3 Changed 8 years ago by Karen Tracey <kmtracey@…>

Keywords: nfa-someday added

Jacob's comment makes me think this is not critical to be addressed before nfa merge?

comment:4 Changed 8 years ago by Marty Alchin

Keywords: fs-rf removed

The filestorage refactor has nothing to do with widgets, much less anything admin-specific, so I'm removing the fs-rf keyword.

comment:5 Changed 8 years ago by Marc Garcia

Owner: changed from nobody to Marc Garcia

comment:6 Changed 7 years ago by Marc Garcia

Owner: Marc Garcia deleted

comment:7 Changed 6 years ago by Julien Phalip

Resolution: fixed
Status: newclosed

Things have changed since 3 years ago and I now can't find any occurrence of target="_blank" in the code, so let's consider this as fixed.

comment:8 Changed 6 years ago by Łukasz Rekucki

Just for reference, (x)HTML 5 no longer deprecates target="blank".

Version 0, edited 6 years ago by Łukasz Rekucki (next)
Note: See TracTickets for help on using tickets.
Back to Top