Opened 9 years ago

Closed 8 years ago

#3907 closed defect (fixed)

Escaping Characters disapearing when using setDocumentAnnotation

Reported by: baudette@… Owned by: Martin Sjölund
Priority: normal Milestone: 1.11.0
Component: Interactive Environment Version: v1.9.4-v1.9.x
Keywords: OM Shell, Save Cc: baudette@…

Description

When using OM Shell or OMPython and modifying the annotations (for documentation), upon saving the model (tried save() and saveModel()), the escaping characters \ added in the HTML code of the annotations that are necessary for the Modelica compiler are removed by OM Shell.

This makes the package unusable by OM Shell, OpenModelica, Dymnola.

I checked with the following procedure:

  • Loading the library in OM Shell
  • reading annotations
  • updating annotations
  • reading annotations (everything looks good)
  • saving

Then in the GIT I can see how all escaping characters have been removed from the files

Attachments (2)

test.mo (184 bytes ) - added by baudette@… 9 years ago.
Resulting File
test.2.mo (188 bytes ) - added by baudette@… 9 years ago.
original file

Download all attachments as: .zip

Change History (8)

comment:1 by Lennart Ochel, 9 years ago

Component: BackendInteractive Environment
Owner: changed from Lennart Ochel to somebody

comment:2 by Adrian Pop, 9 years ago

Can you give a sequence of commands that you did?

comment:3 by baudette@…, 9 years ago

Here is a list of commands I used:

loadFile("C:\\dev\\test.mo")
true

getDocumentationAnnotation(test)
{"","<html>
<a href=\"http://www.rte-france.com\">http://www.rte-france.com</a>
</html>",""}

setDocumentationAnnotation(test,"","<html>
<a href=\"http://www.rte-france.com\">http://www.rte-france.com</a>
</html>")
true

getDocumentationAnnotation(test)
{"","<html>
<a href=\"http://www.rte-france.com\">http://www.rte-france.com</a>
</html>",""}

save(test)
true

by baudette@…, 9 years ago

Attachment: test.mo added

Resulting File

by baudette@…, 9 years ago

Attachment: test.2.mo added

original file

comment:4 by Martin Sjölund, 8 years ago

Milestone: Future1.11.0
Owner: changed from somebody to Martin Sjölund
Status: newaccepted

comment:5 by Martin Sjölund, 8 years ago

Summary: Escaping Characters disapearing when using Save(model)Escaping Characters disapearing when using setDocumentAnnotation

Fixed in PR 1035.

comment:6 by Martin Sjölund, 8 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.