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

Fixes #37898 - Don't copy to clipboard as HTML #206

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

lfu
Copy link
Contributor

@lfu lfu commented Oct 30, 2024

Use $("#config_script").text() to copy the content as it is.

@jeremylenz
Copy link

The PR and commit title should describe what the change is, not describe the bug :)

How about

Fixes #37898 - don't copy to clipboard as HTML

@chris1984 chris1984 self-assigned this Nov 1, 2024
Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

Works great, thanks @lfu I agree with @jeremylenz suggestion, please fix that up and then feel free to merge.

Before PR:

heading "Finished"
if [ $result_code -ne 0 ]; then
  echo "There were some errors during configuration:"
  [ $(($result_code&0)) -ge 1 ] && echo 'Success'
  [ $(($result_code&1)) -ge 1 ] && echo 'Newer version of virt-who is required, minimum version is 0.24.2'
  [ $(($result_code&2)) -ge 1 ] && echo 'Unable to create virt-who config file'
  [ $(($result_code&4)) -ge 1 ] && echo 'Unable to create sysconfig file'
  [ $(($result_code&8)) -ge 1 ] && echo 'Unable to enable virt-who service using systemctl'
  [ $(($result_code&16)) -ge 1 ] && echo 'Unable to start virt-who service, please see virt-who logs for more details'
  [ $(($result_code&32)) -ge 1 ] && echo 'Unable to install virt-who package, make sure the host is properly subscribed and has access to katello-host-tools repository'
else
  echo "Finished successfully"
fi

After PR:

heading "Finished"
if [ $result_code -ne 0 ]; then
  echo "There were some errors during configuration:"
  [ $(($result_code&0)) -ge 1 ] && echo 'Success'
  [ $(($result_code&1)) -ge 1 ] && echo 'Newer version of virt-who is required, minimum version is 0.24.2'
  [ $(($result_code&2)) -ge 1 ] && echo 'Unable to create virt-who config file'
  [ $(($result_code&4)) -ge 1 ] && echo 'Unable to create sysconfig file'
  [ $(($result_code&8)) -ge 1 ] && echo 'Unable to enable virt-who service using systemctl'
  [ $(($result_code&16)) -ge 1 ] && echo 'Unable to start virt-who service, please see virt-who logs for more details'
  [ $(($result_code&32)) -ge 1 ] && echo 'Unable to install virt-who package, make sure the host is properly subscribed and has access to katello-host-tools repository'
else
  echo "Finished successfully"
fi

@lfu lfu force-pushed the 28943_copy_script_with_html_entities branch from b8c5ea9 to f0e88b2 Compare November 4, 2024 15:03
@lfu lfu changed the title Fixes #37898 - Copy to clipboard button copies script with HTML entities Fixes #37898 - Don't copy to clipboard as HTML Nov 4, 2024
@lfu lfu merged commit 800a393 into theforeman:main Nov 4, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants