Opened 8 years ago

Closed 8 years ago

#3907 closed defect (fixed)

Escaping Characters disapearing when using setDocumentAnnotation

Reported by: baudette@… Owned by: sjoelund.se
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@… 8 years ago.
Resulting File
test.2.mo (188 bytes) - added by baudette@… 8 years ago.
original file

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by lochel

  • Component changed from Backend to Interactive Environment
  • Owner changed from lochel to somebody

comment:2 Changed 8 years ago by adrpo

Can you give a sequence of commands that you did?

comment:3 Changed 8 years ago by baudette@…

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

Changed 8 years ago by baudette@…

Resulting File

Changed 8 years ago by baudette@…

original file

comment:4 Changed 8 years ago by sjoelund.se

  • Milestone changed from Future to 1.11.0
  • Owner changed from somebody to sjoelund.se
  • Status changed from new to accepted

comment:5 Changed 8 years ago by sjoelund.se

  • Summary changed from Escaping Characters disapearing when using Save(model) to Escaping Characters disapearing when using setDocumentAnnotation

Fixed in PR 1035.

comment:6 Changed 8 years ago by sjoelund.se

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.