HomePhabricator

Catch undefinied title attribute in lightbox

Description

Catch undefinied title attribute in lightbox

Summary: If the image name in not defined, don't set it. Fixes T6793

Test Plan: View a lightboxed image, no 'undefined' alt tag

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6793

Differential Revision: https://secure.phabricator.com/D11037

Event Timeline

The bug filed was about the title tooltip, not the alt text. Although the bug applied to both.

This commit removed the title attribute entirely, was that on purpose? I don't know what kind of value target_data.name hold and whether it's useful to display to the user.

Yes, removing both was on purpose. I never found it actually set, though it appears it should get set for uploaded non-image files.