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

when import function code replace some " with &quote #1366

Closed
miskoala opened this issue Jan 3, 2020 · 0 comments
Closed

when import function code replace some " with &quote #1366

miskoala opened this issue Jan 3, 2020 · 0 comments
Milestone

Comments

@miskoala
Copy link

miskoala commented Jan 3, 2020

Bug description
When importing function from database:
`CREATE OR REPLACE FUNCTION test(
)
RETURNS text
LANGUAGE 'sql'

AS $BODY$
select '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-C93872BE968FF53476157769365244928">
wsse:Username' || 'TERYT_USERNAME' || '</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">'||'TERYT_PASSWORD'||'</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
wsa:Actionhttp://tempuri.org/ITerytWs1/PobierzDateAktualnegoKatSimc</wsa:Action></soapenv:Header>
soapenv:Body
tem:PobierzDateAktualnegoKatSimc/
</soapenv:Body></soapenv:Envelope>'
as test;
$BODY$;
`

Some quote characters are replaced with: &quot; string.

How to reproduce

  1. create above function in database
  2. import this function to pgmoddeler model,
  3. some " chars are replaced by &quote;
  4. export function to database - function works differently.

Expected behavior
import and export should not change the function code

Info about your desktop

  • OS: OpenSuse 15.1
  • PostgreSQL Version: 12.1
  • Window manager: XFCE
  • pgModeler version: 0.9.2
  • Qt version: 5.9.7
@rkhaotix rkhaotix added the bug label Jan 3, 2020
rkhaotix added a commit that referenced this issue Jan 3, 2020
Moved the method SchemaParser::convertCharsToXMLEntities to XmlParser

Fixed the method XmlParser::convertCharsToXMLEntities in order to avoid
chars replacements within <![CDATA entities
@rkhaotix rkhaotix added this to the v0.9.3 milestone Jan 3, 2020
@rkhaotix rkhaotix added the fixed label Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants