Skip to content

Conversation

@JasonStoltz
Copy link
Member

@JasonStoltz JasonStoltz commented Aug 27, 2018

  • Removed any logic that would pass a "raw" value into a <Result> component as a title or field value, since they are rendered unsafely.
  • Made title optional for <Results>. Since we were falling back to using an id, and id only ever comes back as a raw, unescaped value, we can't use it for the title as a fallback.
Copy link
Contributor

@goodroot goodroot left a comment

Choose a reason for hiding this comment

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

LGTM

function formatResultFields(result) {
return Object.keys(result.data).reduce((acc, n) => {
let value = result.getSnippet(n) || result.getRaw(n);
let value = result.getSnippet(n);
Copy link
Contributor

Choose a reason for hiding this comment

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

Hehehe.

@JasonStoltz JasonStoltz merged commit 874fd0e into master Aug 28, 2018
@JasonStoltz JasonStoltz deleted the dont-use-raw-values branch August 28, 2018 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants