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

ViewString does not correctly escape quotes inside strings #2884

Closed
nathancarter opened this issue Sep 28, 2018 · 1 comment · Fixed by #3693
Closed

ViewString does not correctly escape quotes inside strings #2884

nathancarter opened this issue Sep 28, 2018 · 1 comment · Fixed by #3693
Labels
kind: bug Issues describing general bugs, and PRs fixing them

Comments

@nathancarter
Copy link

Observed behaviour

ViewString does not correctly escape quotes inside strings.

gap> Print(ViewString("fo\"o"));
"fo"o"

Expected behaviour

The same behavior one gets from directly evaluating the string in the console.

gap> "fo\"o";
"fo\"o"

Copy and paste GAP banner (to tell us about your setup)

 ┌───────┐   GAP 4.9.2 of 04-Jul-2018
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-apple-darwin17.7.0-default64
 Configuration:  gmp 6.1.2
 Loading the library and packages ...
 Packages:   AClib 1.3, Alnuth 3.1.0, AtlasRep 1.5.1, AutPGrp 1.9, Browse 1.8.8, CRISP 1.4.4, Cryst 4.1.17, CrystCat 1.1.8, CTblLib 1.2.2,
             FactInt 1.6.2, FGA 1.4.0, GAPDoc 1.6.1, IO 4.5.1, IRREDSOL 1.4, LAGUNA 3.9.0, Polenta 1.3.8, Polycyclic 2.14, PrimGrp 3.3.1,
             RadiRoot 2.8, ResClasses 4.7.1, SmallGrp 1.3, Sophus 1.24, SpinSym 1.5, TomLib 1.2.6, TransGrp 2.0.2, utils 0.54
@stevelinton stevelinton added the kind: bug Issues describing general bugs, and PRs fixing them label Oct 22, 2018
@stevelinton
Copy link
Contributor

That's a clear bug in the ViewString method for lists. If it is going to put " around the string it should escape any necessary characters in the string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Issues describing general bugs, and PRs fixing them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants