Page MenuHomePhabricator

Don't copy `null` attributes passed to JX.$N()
ClosedPublic

Authored by epriestley on Aug 31 2015, 10:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 15, 1:33 AM
Unknown Object (File)
Sat, May 10, 4:43 AM
Unknown Object (File)
Sat, Apr 26, 8:37 PM
Unknown Object (File)
Wed, Apr 23, 5:39 PM
Unknown Object (File)
Apr 10 2025, 9:12 AM
Unknown Object (File)
Apr 5 2025, 3:51 AM
Unknown Object (File)
Apr 4 2025, 3:33 PM
Unknown Object (File)
Mar 25 2025, 6:08 AM
Subscribers
None

Details

Summary

Fixes T8919. In Safari, node.href = null; has no effect, but in Chrome it is like node.href = "null";.

Instead, just use semantics similar to phutil_tag(): don't assign attributes with null values.

Test Plan

No more /null href in Chrome in Owners typehaead.

Typeahead still works in Chrome/Safari.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Don't copy `null` attributes passed to JX.$N().
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Aug 31 2015, 10:31 PM
This revision was automatically updated to reflect the committed changes.