| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fde/xml/fde_xml_imp.h" | 7 #include "xfa/fde/xml/fde_xml_imp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "core/fxcrt/include/fx_ext.h" | 11 #include "core/fxcrt/fx_ext.h" |
| 12 #include "core/fxcrt/include/fx_safe_types.h" | 12 #include "core/fxcrt/fx_safe_types.h" |
| 13 #include "xfa/fgas/crt/fgas_codepage.h" | 13 #include "xfa/fgas/crt/fgas_codepage.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 const uint32_t kMaxCharRange = 0x10ffff; | 17 const uint32_t kMaxCharRange = 0x10ffff; |
| 18 | 18 |
| 19 const uint16_t g_XMLValidCharRange[][2] = {{0x09, 0x09}, | 19 const uint16_t g_XMLValidCharRange[][2] = {{0x09, 0x09}, |
| 20 {0x0A, 0x0A}, | 20 {0x0A, 0x0A}, |
| 21 {0x0D, 0x0D}, | 21 {0x0D, 0x0D}, |
| 22 {0x20, 0xD7FF}, | 22 {0x20, 0xD7FF}, |
| (...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1909 m_BlockBuffer.DeleteTextChars(m_iDataLength - m_iEntityStart, FALSE); | 1909 m_BlockBuffer.DeleteTextChars(m_iDataLength - m_iEntityStart, FALSE); |
| 1910 m_pCurrentBlock = m_BlockBuffer.GetAvailableBlock(m_iIndexInBlock); | 1910 m_pCurrentBlock = m_BlockBuffer.GetAvailableBlock(m_iIndexInBlock); |
| 1911 m_iEntityStart = -1; | 1911 m_iEntityStart = -1; |
| 1912 } else { | 1912 } else { |
| 1913 if (m_iEntityStart < 0 && character == L'&') { | 1913 if (m_iEntityStart < 0 && character == L'&') { |
| 1914 m_iEntityStart = m_iDataLength - 1; | 1914 m_iEntityStart = m_iDataLength - 1; |
| 1915 } | 1915 } |
| 1916 } | 1916 } |
| 1917 m_pStart++; | 1917 m_pStart++; |
| 1918 } | 1918 } |
| OLD | NEW |