Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting title attr. of display_link #2075

Merged
merged 1 commit into from Mar 29, 2016
Merged

Conversation

BstName
Copy link
Contributor

@BstName 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.

'title_attr' => yourls_esc_attr( $title ),
).

Fix:
Plugging in data.url.title as (untrimmed) title attribute (instead of plugging in data.url.url) when setting the variable 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`.
@LeoColomb
Copy link
Member

Indeed. Thanks!

@LeoColomb LeoColomb merged commit 85b06de into YOURLS:master Mar 29, 2016
@BstName BstName deleted the fix branch March 29, 2016 12:02
@BstName
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants