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

issue #2 - save_article_tags function was not referencing string value #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kjkeaston
Copy link

#2
save_article_tags function in publify_admin.js was not referencing the string value for the tag correctly and instead was pulling a large object

@@ -76,7 +76,7 @@ function tag_manager() {
}

function save_article_tags() {
$('#article_keywords').val($('#article_form').find('input[name="hidden-article[keywords]"]'));
$('#article_keywords').val($('#article_form').find('input[name="hidden-article[keywords]"]')["0"].defaultValue);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems dangerous for two reasons:
(1) Why are you indexing into an array using a string?
(2) Why are you using the default value from that input field, rather than the actual value that a user has typed in?

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

Successfully merging this pull request may close these issues.

3 participants