return "", err
}
- highlighted, _ := ns.deps.ContentSpec.Highlight(html.UnescapeString(ss), lang, opts)
+ highlighted, _ := ns.deps.ContentSpec.Highlight(ss, lang, opts)
return template.HTML(highlighted), nil
}
expect interface{}
}{
{"func boo() {}", "go", "", "boo"},
+ // Issue #4179
+ {`<Foo attr=" < "></Foo>`, "xml", "", `&lt;`},
{tstNoStringer{}, "go", "", false},
} {
errMsg := fmt.Sprintf("[%d]", i)
}
require.NoError(t, err, errMsg)
- assert.Contains(t, result, "boo", errMsg)
+ assert.Contains(t, result, test.expect.(string), errMsg)
}
}