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

Display of special characters #657

Open
dvnstrcklnd opened this issue May 26, 2021 · 5 comments
Open

Display of special characters #657

dvnstrcklnd opened this issue May 26, 2021 · 5 comments
Labels

Comments

@dvnstrcklnd
Copy link
Contributor

Describe the bug
Special characters encoded with HTML don't display properly in some parts of the interface.

To Reproduce
Steps to reproduce the behavior:

  1. Add a location to an item using a special character, e.g., "37 °C shaker"
  2. View from show blocks -> OK
  3. View location in technician view or item view -> bad

Expected behavior
Should display uniformly.

Screenshots
image

image

image

@bjkeller
Copy link
Member

Can you share the show block?

@dvnstrcklnd
Copy link
Contributor Author

    show do
      title 'Resuspend and Store Samples'

      note "Resuspend each sample with 30 #{MICROLITERS} #{FORMIC_ACID_WATER}."
      note "Store the samples at 4 #{DEGREES_C}."
    end

@dvnstrcklnd
Copy link
Contributor Author

dvnstrcklnd commented May 26, 2021

Where DEGREES_C = °C

@bjkeller
Copy link
Member

Relevant code:

show block "note":

<p ng-bind-html="content_value(line)" class='md-subhead'></p>

show block "take":

at {{content_value(line).location}}

item popup location field:

ng-model="item.new_location"

@bjkeller
Copy link
Member

The location in the item popup is a textfield – meaning you can edit it. The others are just display.

This gem might help: https://github.com/threedaymonk/htmlentities

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

No branches or pull requests

2 participants