Correcting title attr. of display_link #2075

Merged
merged 1 commit into from Mar 29, 2016

Projects

None yet

2 participants

@BstName
Contributor
BstName commented Mar 29, 2016

Fixes a minor glitch in edit_link_save in insert.js:

Problem / How to reproduce:

After edition of an URL's title, the title attribute of the display title (as visible on hovering the display title) is replaced by the (untrimmed) long URL. This is unexpected/inconsistent behavior [behaviour] since in contrast, for an existing unedited URL title, the respective title attribute is simply the (untrimmed) title itself (see the line 'title_attr' => yourls_esc_attr( $title ), in yourls_table_add_row in functions-html.php: cf. https://github.com/YOURLS/YOURLS/blob/cb86f5b6ff6f4beb4ec525f0b830e122f8f31016/includes/functions-html.php#L561).

Fix:
Plugging in data.url.title as (untrimmed) title attribute (instead of plugging in data.url.url) when setting the variable display_link.

@BstName BstName Correcting title attr. of display_link
Correction in `edit_link_save`:
Plugging in `data.url.title` as (untrimmed) `title` attribute (instead of plugging in `data.url.url`) when setting the variable `display_link`.
209e95e
@LeoColomb
Member

Indeed. Thanks!

@LeoColomb LeoColomb merged commit 85b06de into YOURLS:master Mar 29, 2016

2 checks passed

Scrutinizer No new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@BstName BstName deleted the BstName:fix branch Mar 29, 2016
@BstName
Contributor
BstName commented Mar 29, 2016

You are welcome, thanks for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment