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

Menu endpoints should strip HTML from the food items #58

Open
hawkrives opened this issue Aug 12, 2018 · 0 comments
Open

Menu endpoints should strip HTML from the food items #58

hawkrives opened this issue Aug 12, 2018 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@hawkrives
Copy link
Member

hawkrives commented Aug 12, 2018

In AAO, we have this block of code: views/menus/menu-bonapp.js

prepareFood(cafeMenu: MenuInfoType) {
	return mapValues(cafeMenu.items, item => ({
		...item, // we want to edit the item, not replace it
		station: entities.decode(toLaxTitleCase(trimStationName(item.station))), // <b>@station names</b> are a mess
		label: entities.decode(trimItemLabel(item.label)), // clean up the titles
		description: getTrimmedTextWithSpaces(parseHtml(item.description || '')), // clean up the descriptions
	}))
}

We should figure out the best way to move that to the server (probably somewhere in @frogpond/ccc-lib/bonapp/index.mjs).

@drewvolz drewvolz added the help wanted Extra attention is needed label Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants