A developer has a component named foobar with the following file:
FooBar.java -
foobar.htmlWhat is the output when this component is rendered?
A.
B.
C.
D.
A developer has a component named foobar with the following file:
FooBar.java -
foobar.htmlWhat is the output when this component is rendered?
A.
B.
C.
D.
When this component is rendered, the single quotes within both the returned values of getLinks() and getText() methods will be escaped. The URL encoding will replace the single quote with '%27', and the HTML encoding will replace it with '''. Therefore, the correct output will have the href attribute containing 'https://www.foo%27bar.com' and the text content showing 'foo'bar', matching option A.
Answer is D. Try rendering html on your local AEM instance, you would see Option D result.
If you see decoded values. To verify the encoded output , save web page as html and open the html with Text editor.
Reference: https://www.w3schools.com/tags/ref_charactersets.asp https://www.w3schools.com/tags/ref_urlencode.asp
Answer is C
A https://docs.adobe.com/content/help/en/experience-manager-htl/using/getting-started/getting-started.html#automatic-context-aware-escaping