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

CN: ampersands are not escaped in HTML output, allowing ampersand escapes in output #860

Closed
peterohanley opened this issue Feb 11, 2025 · 0 comments
Labels
bug Something isn't working cn ui/ux Issue with presentation or user experience

Comments

@peterohanley
Copy link

Here is a file that produces the &reg code which renders as ®

void f(void)
{
    int region = 1;
    /*@ assert(false); @*/
}
% cn verify region.c    
[1/1]: f -- fail
region.c:4:9: error: Unprovable constraint
    /*@ assert(false); @*/
        ^~~~~~~~~~~~~~ 
Constraint from region.c:4:9:
    /*@ assert(false); @*/
        ^~~~~~~~~~~~~~ 
State file: file:///var/folders/tz/g0kxkm2915xdtm6qgv8rff000000gp/T/state__region.c__f.html

In the state file:

Available Resources
Owned<signed int>(®ion)(1'i32)
...
@ZippeyKeys12 ZippeyKeys12 added bug Something isn't working ui/ux Issue with presentation or user experience cn labels Feb 11, 2025
dc-mak added a commit to dc-mak/cerberus that referenced this issue Mar 5, 2025
We don't have automatic testing for HTML output (yet) and so this is the
test case:

```c
void f(void)
{
    int region = 1;
    /*@ assert(false); @*/
}
```

If the ampersand is not escaped, on the last page of the output, the
&region turns into "(R)ion".
@dc-mak dc-mak closed this as completed in ee59264 Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cn ui/ux Issue with presentation or user experience
Projects
None yet
Development

No branches or pull requests

2 participants