HTMLフラグメントを編集するためにWinform Textboxを使用しており、プロジェクトはWinforms WebBrowserコントロールを使用しています。私のHTMLimg
タグのsrc
属性がたとえば相対パスを使用している場合src="../cat_images/VOD/VOD_logo_small_2.jpg"
、それは次のようになりますsrc="about:../cat_images/VOD/VOD_logo_small_2.jpg"
を取り除くにはどうすればよいabout:
ですか?
を除外するメソッドを作成するabout:
必要がありますか、またはそれを無効にするために使用できる WebBrowser コントロールに設定がありますか? WebBrowser コントロールは、リターン キャリッジとライン フィードも追加します。これを無効にする方法はありますか?
this.htmDisplay.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.chemicalMasterBindingSource, "CatalogDesc", true));
this.htmDisplay.Fonts = new string[] {
"Corbel",
"Corbel, Verdana, Arial, Helvetica, sans-serif",
"Georgia, Times New Roman, Times, serif",
"Consolas, Courier New, Courier, monospace"};
this.htmDisplay.IllegalPatterns = new string[] {
"<script.*?>",
"<\\w+\\s+.*?(j|java|vb|ecma)script:.*?>",
"<\\w+(\\s+|\\s+.*?\\s+)on\\w+\\s*=.+?>",
"</?input.*?>"};
this.htmDisplay.Location = new System.Drawing.Point(92, 126);
this.htmDisplay.Name = "htmDisplay";
this.htmDisplay.Padding = new System.Windows.Forms.Padding(1);
this.htmDisplay.ShowHtmlSource = true;
this.htmDisplay.Size = new System.Drawing.Size(516, 245);
this.htmDisplay.TabIndex = 149;
this.htmDisplay.ToolbarStyle = GvS.Controls.ToolbarStyles.AlwaysInternal;